S_pot
C#_역 for 반복문 본문
static void Main(string[] args)
{
// 배열생성
int[] intArray = { 1, 2, 3, 4, 5, 6 };
// 요소의 길이를 출력
for (int i = intArray.Length -1;i >= 0; i--)
{
Console.WriteLine(intArray[i]);
}
}
'C#' 카테고리의 다른 글
C#_break키워드 (0) | 2021.06.01 |
---|---|
C#_foreach반복문 (0) | 2021.06.01 |
C#_for 반복문 (0) | 2021.05.31 |
C#_do while 반복문 (0) | 2021.05.31 |
C#_while 반복문 (0) | 2021.05.31 |