返回列表 發帖

我的第一支程式

在螢幕上顯示 hello 字樣.
May

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.     cout<<"大家好"<<endl;
  7.     system("pause");   
  8.     return 0;
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. usireturnng namespace std;

  4. int main()
  5. {
  6.       cout<<"烤麵筋" <<endl;
  7.       system("pause");
  8.        0;
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.      cout<<"尤寶好"<<endl;
  7.      system("pause");   
  8.      return 0;
  9. }
複製代碼

TOP

本帖最後由 謝以恩 於 2020-3-26 17:53 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {      
  6.   cout<<"大家好" <<endl;   
  7.   system("pause");
  8.   return 0;
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;                                          

  4. int main()
  5. {
  6.     cout<<"洪承廷好 "<<endl;
  7.     system("pause");
  8.     return 0;
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.    cout<<"大家好"<<endl;
  7.    system("pause");
  8.    return 0;
  9. }   
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.     cout<<"大家好"<<endl;
  7.     system("pause");
  8.     return 0;   
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.     cout<<"大家好 " <<endl;
  7.     system("pause");
  8.     return 0;
  9. }
複製代碼
林祐霆

TOP

  1. #include<iostream>     //引入 <基本輸入輸出> 標頭檔 input & output stream
  2. #include<cstdlib>      //引入 <標準函式庫> 標頭檔 c standard library
  3. using namespace std;   //指定命名空間為 std

  4. int main()    //主函式
  5. {
  6.     cout<<"大家好"<<endl;   //cout輸出  endl換行
  7.     system("pause");       //讓畫面暫停
  8.     return 0;              //回傳0到主控台,告知該程式已成功執行
  9. }
複製代碼

TOP

返回列表