Tugas Pertemuan Ke-9

Sabtu, 09 Juni 2012

import java.io.*;
public class tugas {

    public static void main(String[] args) throws IOException
    {
    int i, ulang;
    String nama[] = new String[10];
    String nim[] = new String[10];
    String progdi[] = new String[10];
   
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
   
    for(i=1; i<=3; i++)
    {
    System.out.print("Masukkan Nama : ");
    nama[i] = in.readLine();
    System.out.print("Masukkan Nim : ");
    nim[i] = in.readLine();
    System.out.print("Masukkan Progdi \t: ");
    progdi[i] = in.readLine();
    System.out.println("");
   
   
    }
    System.out.println("");
    System.out.println("Nama \t\t Nim\t Progdi");
   
    for(i=1; i<=3; i++)
    {
    System.out.println(nama[i]+" \t\t "+nim[i]+" \t "+progdi[i]);
    }
    }  
}

Hasil dari skrip di atas adalah:



0 komentar: