Last active
April 27, 2020 13:37
-
-
Save singhrahuldps/17c27ff4e071ae0dc64131f47fa19d31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Program to print first 10 odd numbers using while loop | |
| int i = 1, count = 0; | |
| while(count != 10) { | |
| if(i%2==1) { | |
| count++; | |
| System.out.printf("%d ", i); | |
| } | |
| i++; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment