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