Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Zadaca {
- public static void main(String[] args) {
- for(int i = 1; i <= 10; i++) {
- if(i % 2 == 0) {
- continue;
- }
- System.out.println(i);
- if(i == 7) {
- break;
- }
- }
- int i = 1;
- while(i <= 10) {
- if(i % 2 == 0) {
- i++;
- continue;
- }
- System.out.println(i);
- if(i == 7) {
- break;
- }
- i++;
- }
- i = 1;
- do {
- if(i % 2 == 0) {
- i++;
- continue;
- }
- System.out.println(i);
- if(i == 7) {
- break;
- }
- i++;
- } while(i <= 10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement