Created
September 6, 2016 07:17
-
-
Save wohhie/c20d32891460659e9d59d09fa7cdcfe3 to your computer and use it in GitHub Desktop.
Print 0 to 10 and then print 10 to 0
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
package javatest; | |
/** | |
* | |
* @author tousifosman | |
*/ | |
public class JavaTest { | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) { | |
for(int i = 0, j = 0; i >= 0; i = i + 1 - 2 * (j/10), j++) | |
System.out.println(i); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment