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 Hikaku{ | |
public static void main(String[] a){ | |
int A = 2; | |
int B = 10; | |
int C = 6; | |
if(A>B && A>C){ | |
//if1のtrue時 |
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 Hikaku5{ | |
public static void main(String[] a){ | |
int A = 3; | |
int B = 10; | |
int C = 6; | |
int D = 15; | |
int E = 22; | |
if(A>B && A>C && A>D && A>E){ |
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 Baisuu{ | |
public static void main(String[] args){ | |
int i=1; | |
int A=2*i; | |
for(i=1;A<=32;i++){ | |
System.out.println(A); | |
} | |
} | |
} |
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 Baisuu{ | |
public static void main(String[] args){ | |
int A = 2; | |
for(int i=1;A<=32;i++){ | |
System.out.println(A*i); | |
} | |
} | |
} |
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 Baisuu{ | |
public static void main(String[] args){ | |
int A = 1; | |
for(int i=1;A<=32;i++){ | |
A = i * 2; | |
System.out.println(A); | |
} | |
} | |
} |
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 Baisuu{ | |
public static void main(String[] args){ | |
int A = 1; | |
for(int i=1;A<31;i++){//32までの2の倍数を表示したい | |
A = i * 2; | |
System.out.println(A); | |
} | |
} | |
} |
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 Sosuu{ | |
public static void main(String[] args){ | |
//変数宣言 | |
int A = 2; | |
//100までの素数を表示する | |
for(A=2;A<=100;A++){//とりあえずAを2からはじめて1ずつ100まで足す | |
if(A%2!=0 && A%3!=0 && A%5!=0 && A%7!=0){//自身と1以外で割れる数字をはぶきたい | |
System.out.println(A); | |
} |
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 Check11{ | |
public static void main(String[] args){ | |
//変数宣言 | |
int B = 11;//素数かどうか判断される数字 | |
boolean flag=true;//trueなら素数 falseなら素数じゃないにしたい | |
//調べる | |
for(int i=2;i<=B-1;i++){//B-1までの数を全部調べたい |
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 = 0; | |
for(A=0;A<=100;A++){ | |
System.out.println(A); | |
} | |
} |
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); | |
} |
OlderNewer