ok

Wednesday, 11 November 2015

Contoh Program Java Pakai BufferReader

PAKAI BUFFERREADER

import java.io.*;
public class Pakai_BufferReader {
     public static void main(String[] args)throws IOException{
     BufferedReader input = new
        BufferedReader(new InputStreamReader(System.in));
        String nama,stb;
        int tugas,mid,uas;
        System.out.print("Masukkan STB = ");
    stb = input.readLine();
    System.out.print("Masukkan Nama = ");
    nama = input.readLine();
    System.out.print("Masukkan Nilai Tugas = ");
    tugas = Integer.parseInt(input.readLine());
    System.out.print("Masukkan Nilai MID = ");
    mid = Integer.parseInt(input.readLine());
    System.out.print("Masukkan Nilai Final = ");
    uas = Integer.parseInt(input.readLine());
    System.out.println("===========================");
    System.out.println("STB = "+stb);
    System.out.println("NAMA = "+nama);
    System.out.println("NILAI TUGAS = "+tugas);
    System.out.println("NILAI MID  = "+mid);
    System.out.println("NILAI FINAL = "+uas);
     }
}
Share:

Baca Juga Artikel

Like

Rusdyanha.com