Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.     // write your code here
  5.         int x =0;
  6.         int y = 30;
  7.         for (int outer = 0; outer<3;outer++){
  8.             for (int inner=4; inner>1;inner--){
  9.  
  10.                 x=x+3;
  11.  
  12.                 y=y-2;
  13.                 if (x==6){
  14.                     break;
  15.                 }
  16.                 x = x+3;
  17.             }
  18.             y = y-2;
  19.         }
  20.         System.out.println(x+ " " + y);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement