Social Icons

Cara mendapatkan bitcoin gratis

Sunday, 7 September 2014

mengasih bingkai pada nama

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 :


No comments:

Post a Comment

jago Photoshop