返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>

  3. using namespace std;

  4. int main()
  5. {
  6.         int a;
  7.         float b;
  8.         string c;
  9.         char d;
  10.        
  11.         cout << "請輸入一個整數 a :";
  12.         cin >> a;
  13.        
  14.         cout << "請輸入一個浮點數 b :";
  15.         cin >> b;
  16.        
  17.         cout << "請輸入一個字串 c :";
  18.         cin >> c;
  19.        
  20.         cout << "請輸入一個字元 d :";
  21.         cin >> d;
  22.         cout <<"======================"<<endl;
  23.        
  24.         cout << "a="<<a<<endl;
  25.         cout << "b="<<b<<endl;
  26.         cout << "c="<<c<<endl;
  27.         cout << "d="<<d<<endl;
  28.         system("pause");
  29.         return 0;
  30. }
複製代碼

TOP

返回列表