- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int a;
- float b;
- string c;
- char d;
-
- cout << "請輸入一個整數 a :";
- cin >> a;
-
- cout << "請輸入一個浮點數 b :";
- cin >> b;
-
- cout << "請輸入一個字串 c :";
- cin >> c;
-
- cout << "請輸入一個字元 d :";
- cin >> d;
- cout <<"======================"<<endl;
-
- cout << "a="<<a<<endl;
- cout << "b="<<b<<endl;
- cout << "c="<<c<<endl;
- cout << "d="<<d<<endl;
- system("pause");
- return 0;
- }
複製代碼 |