Thursday, October 18, 2012

Coding Java di Netbeans

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pthervamakmur;

import java.util.Scanner;

/**
 *
 * @author Herva Savaruly
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
         int Poe, Tanggal;
        String PoeString = null;
        Scanner Avreh = new Scanner(System.in);
        System.out.print("Eusian tanggal : ");
        Poe = Avreh.nextInt();
        if (Poe <=31)
        {
        Tanggal = Poe %7;
        switch(Tanggal){
            case 0 : PoeString = ("Minggu"); break;
            case 1 : PoeString = ("Senen"); break;
            case 2 : PoeString = ("Salasa"); break;
            case 3 : PoeString = ("Reubo"); break;
            case 4 : PoeString = ("Kamis"); break;
            case 5 : PoeString = ("Jumat"); break;
            case 6 : PoeString = ("Sabtu"); break;
        }
        System.out.println("Poe"+ PoeString);
         }
        else {
            System.out.println("salah tanggal");
        }
        {System.out.println("Thank You");

}
}
}

No comments:

http://goo.gl/BGVrJP

MY Motto

My photo
giving amenity to all visitor.

Total Pageviews