-
-
Save uncoded-ro/bda4b19e0c69df868afc004e1a1f695f to your computer and use it in GitHub Desktop.
This file contains 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
class Iteratie { | |
public static void main(String[] args) { | |
int i; | |
// instructiunea while | |
i = 0; | |
while (i < 10) { | |
System.out.print(i + " "); | |
i++; | |
} | |
System.out.print("\n"); | |
// instructiunea do-while | |
i = 0; | |
do { | |
System.out.print(i + " "); | |
i++; | |
} while (i < 10); | |
System.out.print("\n"); | |
// instructiune for | |
for (i = 0; i < 10; i++) | |
System.out.print(i + " "); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment