Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NestedLoop {
- public static void main(String[] args) {
- for (int x=1; x<=5; x++) {
- for (int y=1; y<=6; y++) {
- if (x==1||x==5||y==1||y==6) {
- System.out.print("*");
- }
- else {
- System.out.print(" ");
- }
- }
- System.out.println();
- }
- System.out.println("andari");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment