返回列表 發帖
  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.                
  23.         cout<<"======================"<<endl;
  24.        
  25.         cout<<"a="<<a<<endl;
  26.         cout<<"b="<<a<<endl;
  27.         cout<<"c="<<c<<endl;
  28.         cout<<"d="<<d<<endl;
  29.        
  30.         system("pause");
  31.         return 0;
  32. }
複製代碼

TOP

返回列表