/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ujian_praktikum;
import java.io.DataInputStream;
import java.io.IOException;
/**
*
* @author adhy
*/
public class Stasiun_Sesuai_Soal {
public static void main(String[] args) throws IOException {
String []stasiun={"TVRI","Trans Tv","Trans 7"," ANTV","Indosiar"," RCTI","SCTV","TPI","Global TV","TV One"};
String []acara={"Dunia Dalam Berita","Bioskop Trans TV: Die Hard","Bukan empat Mata"," Tawa Sutra","take me out"," Isabella","Melati Untuk Marvel","KDI 6","Spongebob","Bang One"};
System.out.println("+---------------------------------------------------\n"
+ " No | Stasiun | Acara \n"
+ " 0 | T V R I | Dunia Dalam Berita \n"
+ " 1 | Trans TV | Bioskop Trans TV: Die Hard\n"
+ " 2 | Trans 7 | Bukan empat Mata\n"
+ " 3 | A N T V | Tawa Sutra\n"
+ " 4 | Indosiar | take me out\n"
+ " 5 | R C T I | Isabella\n"
+ " 6 | S C T V | Melati Untuk Marvel \n"
+ " 7 | T P I | KDI 6\n"
+ " 8 | Global TV | Spongebob\n"
+ " 9 | TV One | Bang One\n"
+ "+-----------------------------------------------------");
DataInputStream adhy=new DataInputStream(System.in);
System.out.println("NB: ");
System.out.println("Masukkan Stasiun Pilihan Anda :> ");
String Masuk=adhy.readLine();
System.out.println(" no. Channel : " +Masuk+"\n"
+ " Stasiun Sekarang : "+stasiun[1]+"\n"
+ " acara Sekarang : "+acara[1]+"\n"
+ "\n"
+ " Stasiun Favorit : "+stasiun[4]+"\n"
+ " Acara Favorit : "+acara[4]);
}
}
- Home
- Pemrograman Penggunaan Input Stream dan array







No comments:
Post a Comment