Selasa, 07 Oktober 2014

Aplikasi daftar Rumah Sakit

kasus :
Untuk mengetahui daftar nama Rumah Sakit beserta lokasinya


/*
 * 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 malaa;

/**
 *
 * @author User
 */
import java.util.Scanner;
public class Malaa {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner Kota=new Scanner(System.in);
        System.out.print("kode Kota = ");
        int kode=Kota.nextInt();
       
        if(kode==1){
            System.out.println("Nama RS = PMI");
            System.out.println("Nama Kota = Bogor");
           
        }else if (kode==2){
            System.out.println("Nama RS = Bhakti Yudha");
            System.out.println("Nama Kota = Depok");
           
        }else if (kode==3){
            System.out.println("Nama RS = Fatmawati");
            System.out.println("Nama Kota = Jakarta");
           
        }else{
            System.out.println("Nama RS = RSUD");
            System.out.println("Nama Kota = Pamulang");
        }
         
    }  
   
}