78
Java program to print the following pattern on the console
Algorithm:
- STEP 1: START
- STEP 2: SET i =1.REPEAT STEP 3 to 7UNTIL i<=10.
- STEP 3: SET j=1.REPEAT STEP 4 and 5UNTIL j<=10.
- STEP 4: if(i==0 or i==10 or j==0 or j==10) then PRINT 1 else PRINT “”
- STEP 5: SET j=j+1
- STEP 6: PRINT new line.
- STEP 7: SET i=i+1
- STEP 8: END
Program:
Output:
Next TopicJava Programs