Board logo

標題: 基本輸入輸出 [打印本頁]

作者: 陳品肇    時間: 2018-4-9 21:39     標題: 基本輸入輸出

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a;
  7.     cout<<"請輸入一整數: ";
  8.     cin>>a;
  9.     cout<<"你剛輸入的數是: "<<a<<endl;
  10.     system("pause");
  11.     return 0;   
  12. }
複製代碼

作者: 陳柏霖    時間: 2018-4-14 17:07

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. int w;
  7. cout<<"w=";
  8. cin>>w;
  9. cout<<"w="<<w<<endl;   
  10. system("pause");
  11. return 0;   
  12. }
複製代碼

作者: 蔡季庭    時間: 2018-4-14 17:07

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x;
  7.     cout<<"請輸入抹個咚咚" ;
  8.     cin>>x ;
  9.     cout<<"你輸出的是這個:"<<x<<endl;
  10.     system ("pause");
  11.     return 0   ;
  12. }
複製代碼

作者: 譚詩澐    時間: 2018-4-14 17:08

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.       int x;
  7.       cout<<"輸入的x";
  8.       cin>>x;
  9.       cout<<"輸出的x="<<x<<endl;
  10.       system("pause");
  11.       return 0;
  12. }
複製代碼

作者: 蔡依宸    時間: 2018-4-14 17:09

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    int x;
  7.    cout<<"請輸入號碼:"<<endl;
  8.    cin>>x;
  9.    cout<<"輸入碼是:"<<x<<endl;
  10.    system("pause");
  11.    return 0;
  12.          
  13.    
  14.    
  15.    
  16.    
  17.    
  18.    
  19.    
  20.    
  21. }
複製代碼

作者: 王旋兆    時間: 2018-4-14 17:12

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {         
  6.   int a;
  7.   cout<<"a=";
  8.   cin>>a;
  9.   cout<<"a"<<a<<endl;
  10.   system("pause");
  11.   return 0;      
  12. }
複製代碼

作者: 陳杏宜    時間: 2018-4-14 17:14

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x;
  7.     cout<<"x=";
  8.     cin>>x;
  9.     cout<<"我剛輸入的是:"<<x<<endl;
  10.     system("pause");
  11.     return 0;
  12. }
複製代碼

作者: 戴安利    時間: 2018-6-2 13:24

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x = 5;
  7.     cout<<"請輸入一個值:";
  8.     cin>>x;
  9.     cout<<x<<endl;
  10.     system("pause");
  11.     return 0;
  12. }
複製代碼

作者: 戴偉宸    時間: 2018-6-2 13:29

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a;
  7.           cout<<"請輸入一個數"<<endl;
  8.           cin>>a;
  9.           cout<<"你剛剛輸入的數是:"<<a<<endl;
  10.           system("pause");
  11.           return 0;
  12.            
  13.    
  14.    
  15. }
複製代碼

作者: 戴唯陞    時間: 2018-6-2 13:30

本帖最後由 陳品肇 於 2018-6-2 13:33 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.      int x;
  7.      cin>>x;
  8.      cout<<x<<endl;
  9.      system("pause");
  10.      return 0;
  11. }
複製代碼





歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/) Powered by Discuz! 7.2