/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package adirp.com;
import java.util.Scanner;
/**
*
* @author adi
*/
public class AdirpCom {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner input=new Scanner(System.in);
int score;
System.out.print("Input your score : ");
score=input.nextInt();
if (score<=60){
System.out.println("your score is D");
}else if(score<=70){
System.out.println("your score is C");
}else if(score<=80){
System.out.println("your score is B");
}else if(score<=100){
System.out.println("your score is A");
}
}
}
mudah mudahan semakin mendalami tentang if else karna ini salah satu yang akan sering di gunakan di pemograman kecil maupun besar nanti. lihat vidionya di bawah
0 comments:
Post a Comment