返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    
  7.     int number1=3;
  8.     int number2=7;
  9.    
  10.     cout<<number1+number2<<endl;
  11.     cout<<number1-number2<<endl;
  12.      cout<<number1*number2<<endl;
  13.      cout<<number1/number2<<endl;
  14.       cout<<number1%number2<<endl;
  15.       
  16.     system("pause");
  17. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int number1=32;
  7.     int number2=14;
  8.     cout<<"number1+number2="<<number1+number2<<endl;
  9.     cout<<"number1-number2="<<number1-number2<<endl;
  10.     cout<<"number1*number2="<<number1*number2<<endl;
  11.     cout<<"number1/number2="<<number1/number2<<endl;
  12.     cout<<"number1%number2="<<number1%number2<<endl;
  13.    
  14.     system("pause");
  15.     return 0;
  16.    
  17.    
  18.     }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int number1 = 23;
  7.     int number2 = 7;
  8.     cout<<number1+number2<<endl;
  9.     cout<<number1-number2<<endl;
  10.     cout<<number1*number2<<endl;
  11.     cout<<number1/number2<<endl;
  12.     cout<<number1%number2<<endl;
  13.     system("pause");
  14.     return 0;        
  15. }   
複製代碼

TOP

本帖最後由 林孟霆 於 2017-8-1 15:54 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int number1=30;
  7.     int number2=5;
  8.     cout<<number1+number2<<endl;
  9.     cout<<number1-number2<<endl;
  10.     cout<<number1*number2<<endl;
  11.     cout<<number1/number2<<endl;
  12.     cout<<number1%number2<<endl;
  13.     system("pause");
  14.     return 0;
  15. }
複製代碼

TOP

返回列表