import java.io.*;
public class contoh
{
public static void main (String [] args) throws IOException
{
char nilai;
String nama;
BufferedReader sr=new BufferedReader (new InputStreamReader(System.in));
System.out.print("masukan nama anda:");
nama = sr.readLine();
System.out.print ("masukan nilai anda:");
nilai = (char)sr.read();
System.out.println("nama saya:" +nama);
System.out.println("nilai saya:" +nilai);
}
}
public class contoh
{
public static void main (String [] args) throws IOException
{
char nilai;
String nama;
BufferedReader sr=new BufferedReader (new InputStreamReader(System.in));
System.out.print("masukan nama anda:");
nama = sr.readLine();
System.out.print ("masukan nilai anda:");
nilai = (char)sr.read();
System.out.println("nama saya:" +nama);
System.out.println("nilai saya:" +nilai);
}
}
No comments:
Post a Comment