返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. int a ;
  7. float b ;
  8. char c ;
  9. string d ;
  10. cout<<"請輸入一個整數 a :";
  11. cin>>a;

  12. cout<<"請輸入一個浮點數 b : ";
  13.         cin>>b;     

  14. cout<<"請輸入一個字元 c :";
  15.     cin>>c;

  16. cout<<"請輸入一個字串 d :";       
  17.         cin>>d;
  18. cout<<"======================"<<endl;

  19. cout<<"a ="<< a <<endl;
  20.         cout<<"b ="<<b <<endl;
  21.        
  22.         cout<<"c ="<< c <<endl;
  23.         cout<<"d ="<< d <<endl;
  24.        
  25.         system("pause");
  26.     return 0;
  27. }
複製代碼

TOP

返回列表