Selamat Datang Di Nuryanti Hikaru-Akira Kokoroga Ki-zutsuku ✿ ◠‿ ◠ (▼).

Wednesday, October 9, 2013

Perulangan Switch


package SEMESTER3;

/**
 *
 * @author user
 */
public class Switch_Nilai {
    public static void main(String[] tyan){
        int grade = 100;
        switch (grade){
            case 100:
                System.out.println("Excellent");
                break;
            case 90:
                System.out.println("God Job");
                break;
            case 80:
                System.out.println("Study Harder !");
                break;
            default:
                System.out.println("Sorry, you failed");
        }
    }
}



run:
Excellent
BUILD SUCCESSFUL (total time: 0 seconds)

0 komentar:

Post a Comment

By :
Free Blog Templates