返回列表 發帖
  1. #include<iostream>     //in & out stream
  2. #include<cstdlib>      //c standard library
  3. using namespace std;   //name using space
  4. int main()    //???
  5. {
  6.     cout<<"hello"<<endl;
  7.         cout<<"this is a C++ program file"<<endl;
  8.         cout<<"if you want to close this messege,tap 0 two times"<<endl;
  9.         cout<<"thank you"<<endl;
  10.     system("pause");       //to pause the screen
  11.     return 0;              //finish program,and reset
  12. }
複製代碼

TOP

本帖最後由 楊侍穎 於 2018-7-11 10:00 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a;
  7.     cout<<"please type a whole number: ";
  8.     cin>>a;
  9.     cout<<"you typed: "<<a<<endl;
  10.     system("pause");
  11.     return 0;
  12. }
複製代碼

TOP

返回列表