Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import static java.lang.System.*;
- import java.util.Scanner;
- import java.lang.Math;
- public class Lesson_13_Activity_Four {
- public static void main (String str[]) throws IOException {
- int x;
- Scanner scanner = new Scanner(System.in);
- System.out.println("An integer from 0-4");
- x = scanner.nextInt();
- if(x == 0 ) {
- System.out.println("F");
- }
- else if(x == 1 ) {
- System.out.println("D");
- }
- else if(x == 2 ) {
- System.out.println("C");
- }
- else if(x == 3 ) {
- System.out.println("B");
- }
- else if(x == 4 ) {
- System.out.println("A");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement