怎么運行不出來啊
public class HelloWorld{
? ? public static void main(String[] args) {
? ? int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? three=one+two;
? ? ? ? int a=three+=one;
? ? ? ? int b=three-=one;
? ? ? ? int c=three*=one;
? ? ? ? int d=three/=one;
? ? ? ? int e=three%=one;
? ? ? ? System.out.printlin("three=one+two"==>+three);
? ? ? ? System.out.printlin("three+=one"==>+a);
? ? ? ? System.out.printlin("three-=one"==>+b);
? ? ? ? System.out.printlin("three*=one"==>+c);
? ? ? ? System.out.printlin("three/=one"==>+d);
? ? ? ? System.out.printlin("three%=one"==>+e);
2020-01-23
一共兩個問題,給你用單行注釋標記了
public?class?HelloWorld{ ????public?static?void?main(String[]?args)?{ ????????int?one?=?10?; ????????int?two?=?20?; ????????int?three?=?0?;? ????????three=one+two; ????????int?a=three+=one; ????????int?b=three-=one; ????????int?c=three*=one; ????????int?d=three/=one; ????????int?e=three%=one;? ????????//你的所有System.out.println都錯寫為System.out.printlin了 ????????System.out.println("three=one+two?==>"+three);????//題目里??==>??是要打印的內容 ????????System.out.println("three+=one?==>"+a); ????????System.out.println("three-=one?==>"+b); ????????System.out.println("three*=one?==>"+c); ????????System.out.println("three/=one?==>"+d); ????????System.out.println("three%=one?==>"+e); ????????} }2020-02-06
我的是這樣
public class HelloWorld{
? ? public static void main(String[] args) {
? ? int one = 10 ;
? ? ? ? int two = 20 ;
? ? ? ? int three = 0 ;
? ? ? ? ?int a=three=one+two;
? ? ? ? ?int b=three+=one;
? ? ? ? ?int c=three-=one;
? ? ? ? ?int d=three*=one;
? ? ? ? ?int e=three/=one;
? ? ? ? ?int f=three%=one;
? ? ? ? ?
? ? ? ? System.out.println("three = one +two==>"+a);
? ? ? ? System.out.println("three +=one==>"+b);
? ? ? ? System.out.println("three -=one==>"+c);
? ? ? ? System.out.println("three? *=one==>"+d);
? ? ? ? System.out.println("three /=one==>"+e);
? ? ? ? System.out.println("three %=one==>"+f);
2020-01-30
int?
three?=?0?;?這個要去掉