java數(shù)據(jù)符合使用問題
int SUM=age1+age2+age3+age4; double avg=SUM/4; int minus=age1-age2; int newAge=--age1; ? ? 哪里錯(cuò)了請問大家?
int SUM=age1+age2+age3+age4; double avg=SUM/4; int minus=age1-age2; int newAge=--age1; ? ? 哪里錯(cuò)了請問大家?
2016-05-09
舉報(bào)
2016-05-09
? ? ? ? int sum=age1+age2+age3+age4;
? ? ? ? double avg=sum/4;
? ? ? ? int minus=age1-age2;
? ? ? ? int newAge=--age1;
上面那個(gè)是我自己的,剛做的通過了啊。沒看出來 你這個(gè)跟我這個(gè)有什么區(qū)別。
2016-05-09
你那個(gè)sum 應(yīng)該用小寫。因?yàn)轭}里面 下面輸出 ?是用的小寫。
2016-05-09
sum初始化了嗎