Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 15552
- 연결
- 이클립스
- 예제
- 백준
- union
- 트리거
- 오라클
- 집합 연산자
- sql 예제
- for문
- 저장
- 그룹함수
- 데이터베이스
- 단일행 함수
- while
- 조건문
- rank
- 프로시저
- java
- 서브쿼리
- join
- 반복문
- SQL
- Sequence
- BufferedReader
- 별찍기
- PARTITION BY
- 무결성 제약 조건
- BufferedWriter
Archives
- Today
- Total
control Y
시험 성적(9498) 본문
시험 점수를 입력받아 90 ~ 100점은 A, 80 ~ 89점은 B, 70 ~ 79점은 C, 60 ~ 69점은 D, 나머지 점수는 F를 출력하는 프로그램을 작성하시오.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int ju;
Scanner scan = new Scanner(System.in);
ju = scan.nextInt();
if(ju<=100 && ju>=90 ) {
System.out.println("A");
}
if(ju<90 && ju>=80 ) {
System.out.println("B");
}
if(ju<80 && ju>=70 ) {
System.out.println("C");
}
if(ju<70 && ju>=60 ) {
System.out.println("D");
}
if(ju<60) {
System.out.println("F");
}
}
}
반응형
'백준(Baekjoon Online Judge) > [JAVA] 조건문' 카테고리의 다른 글
오븐시계(2525) (1) | 2023.06.18 |
---|---|
알람 시계(2884) (1) | 2023.06.18 |
사분면 고르기(14681) (0) | 2023.06.18 |
윤년(2753) (0) | 2023.06.18 |
두 수 비교하기(1330) (0) | 2023.06.18 |