Last active
December 23, 2015 14:49
-
-
Save hiyorineko/6651245 to your computer and use it in GitHub Desktop.
1+2+3+...+100ってしたいコード
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
public class Tasu{ | |
public static void main(String[] args){ | |
int A = 1; | |
for(int i=1;i<100;i++){//とりあえず100回カウントしてもらう | |
A = A + i;//ループカウンタさんが全てやってくれました | |
} | |
System.out.println(A); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment