Sabtu, 09 April 2011

tugas 2ku.....

import java.io.*;

class Tugascharles2{
public static void main (String[] args) throws IOException {
System.out.print("Input Nama : ");
String nama;
InputStreamReader x = new InputStreamReader(System.in);
BufferedReader y = new BufferedReader(x);
nama = (String) y.readLine();
System.out.print("Input Alamat : ");
String alamat;
InputStreamReader a = new InputStreamReader(System.in);
BufferedReader b = new BufferedReader(a);
alamat = (String) b.readLine();

System.out.print("Input Umur : ");
String umur;
InputStreamReader d = new InputStreamReader(System.in);
BufferedReader f = new BufferedReader(d);
umur = (String) f.readLine();

System.out.println("Saudara " + nama);
System.out.println("Tinggal di " + alamat);
System.out.println("Berusia " + umur + " tahun");
}
}

Tidak ada komentar:

Posting Komentar