시험 등급
Console(콘솔)/실습 2019. 9. 25. 08:58
Console.WriteLine("시험점수느 0보다 크거나 같고, 100보다 작거나 같은 정수이다."); for (; ; ) { Console.WriteLine("시험 점수를 입력하세요."); int input = int.Parse(Console.ReadLine()); Console.Clear(); Console.WriteLine(input); if (100 >= input && input >= 90) { Console.Clear(); Console.WriteLine("A"); } else if (89 >= input && input >= 80) { Console.Clear(); Console.WriteLine("B"); } else if (79 >= input && input >= 70) { Console.Clear(); Console.WriteLine("C"); } else if (69 >= input && input >= 60) { Console.Clear(); Console.WriteLine("D"); } else { Console.Clear(); Console.WriteLine("F"); } } |
'Console(콘솔) > 실습' 카테고리의 다른 글
switch문, if-else문 사용 (0) | 2019.09.26 |
---|---|
***Hello World!*** (0) | 2019.09.25 |
*** 상품목록2 *** (0) | 2019.09.23 |
*** 상품목록 *** (0) | 2019.09.23 |
2019-09-20 (0) | 2019.09.20 |