Q-2-Write a java program that displays your name and address on the screen as if it were a letter. Your output should look something like that below
INPUT :
public class NCM {
public static void main(String[] args) {
System.out.println("+--------------------------------------------------------+");
System.out.println("| #### |");
System.out.println("| #### |");
System.out.println("| #### |");
System.out.println("| |");
System.out.println("| |");
System.out.println("| Kanha Nayak |");
System.out.println("| Plot No.-408,Aiginia |");
System.out.println("| Bhubaneswar |");
System.out.println("| |");
System.out.println("+--------------------------------------------------------+");
}
}
INPUT :
public class NCM {
public static void main(String[] args) {
System.out.println("+--------------------------------------------------------+");
System.out.println("| #### |");
System.out.println("| #### |");
System.out.println("| #### |");
System.out.println("| |");
System.out.println("| |");
System.out.println("| Kanha Nayak |");
System.out.println("| Plot No.-408,Aiginia |");
System.out.println("| Bhubaneswar |");
System.out.println("| |");
System.out.println("+--------------------------------------------------------+");
}
}
OUTPUT :
+--------------------------------------------------------+
| #### |
| #### |
| #### |
| |
| |
| Kanha Nayak |
| Plot No.-408,Aiginia |
| Bhubaneswar |
| |
+---------------------------------------------------------+
Nice one
ReplyDeleteGood job
ReplyDelete