Source Code :
public class Bingkai{
public static void main (String [] str){
String nama;
int panjang;
System.out.print("\nNAMA : ");
nama = System.console().readLine();
panjang = nama.length() + 4;
System.out.println("");
System.out.print("+");
for(int i = 0; i < panjang + 4; i++){
System.out.print("=");
}
System.out.println("+");
System.out.print("| ");
System.out.print("+");
for(int i = 0; i < panjang; i++){
System.out.print("=");
}
System.out.print("+");
System.out.println(" |");
System.out.println("| | " + nama + " | |");
System.out.print("| +");
for(int i = 0; i < panjang; i++){
System.out.print("=");
}
System.out.print("+");
System.out.println(" |");
System.out.print("+");
for(int i = 0; i < panjang + 4; i++){
System.out.print("=");
}
System.out.println("+");
System.out.println("");
}
}
Outputnya :
0 comments:
:)) :)] ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} ~x( :-t b-( :-L x( =))
Post a Comment