Skip to content

Instantly share code, notes, and snippets.

@sugiartocokrowibowo
Created October 4, 2017 12:52
Show Gist options
  • Select an option

  • Save sugiartocokrowibowo/1b4b3cd3cf348ac23f2deea8b2e75927 to your computer and use it in GitHub Desktop.

Select an option

Save sugiartocokrowibowo/1b4b3cd3cf348ac23f2deea8b2e75927 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class E {
/**
* @param args
*/
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.println("INPUT");
System.out.print("Masukkan Nilai : ");
double x = s.nextDouble();
System.out.println("\nOUTPUT");
if(x>85){
System.out.println("Nilai Huruf : A");
}else if(x>70){
System.out.println("Nilai Huruf : B");
}else if(x>65){
System.out.println("Nilai Huruf : C");
}else if(x>50){
System.out.println("Nilai Huruf : D");
}else{
System.out.println("Nilai Huruf : E");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment