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
/*Javaで数字を比較するときにif文を使用したりします。例えば「a = 12, b = 24で大きい方はどちらですか」という問題が出たらどう答えますか。私が即座に思いついた答えは | |
*/ | |
public static void main(String[] args){ | |
int a = 12; | |
int b = 24; | |
int diff; | |
if(a > b){ | |
diff = a -b; |