Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lesson72 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- //output 3 "*"
- // 0 1 1 times
- // 0 100 100 times
- // for (int i=0; i<3; i++) {
- // System.out.print("*");
- // }
- //Task 1:
- for (int j=0; j<3; j++) {
- System.out.print("*");
- for (int i=0; i<2; i++) {
- System.out.print(" ");
- }
- System.out.print("*");
- for (int i=0; i<2; i++) {
- System.out.print(" ");
- }
- System.out.print("*");
- System.out.println();
- }
- //output one "*"
- //output 2 spaces
- //output one "*"
- //output 2 spaces
- //output one "*"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement