java中的賦值運算符,幫我看看。總感覺不對
public class HelloWorld{
? ? public static void main(String[] args) {
? ?int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? int three=one+two==>30;
? ? ? ? int three+=one==>40;
? ? ? ? int three-=one==>30;
? ? ? ? int three*+one==>300;
? ? ? ? int three/=one==>30;
? ? ? ? int three%/==>0
應(yīng)用運算符實現(xiàn):
? ? ? ? int three=one+two==>30;
? ? ? ? int three+=one==>40;
? ? ? ? int three-=one==>30;
? ? ? ? int three*+one==>300;
? ? ? ? int three/=one==>30;
? ? ? ? int three%/==>0
? ??
我很奇怪,總感覺不對。但是已經(jīng)同過了測試題到底是什么回事?
? ??
2016-08-19
同學(xué),==》不是運算符,它是提形象化的指示符號,應(yīng)該寫在“ ”里面
這段代碼應(yīng)該這樣寫
方便請采納
2016-08-19
該節(jié)編程練習(xí)不驗證代碼,要看輸出里面有沒有錯誤