返回列表 發帖

我的第一支程式

本帖最後由 許婷芳 於 2020-1-21 14:26 編輯

在螢幕上顯示 hello 字樣.
  1. #include<iostream>  //引入<基本輸入輸出>標頭檔  input & output stream
  2. #include<cstdlib>   //引入<標準函式庫>標頭檔   c standard library
  3. using namespace std;   //指定命名空間 std;
  4. int main()  //主函式
  5. {
  6.     cout<<"hello"<<endl;  //endl 換行
  7.     system("pause");  //讓畫面暫停  
  8.     return 0;   //回傳0給電腦,告知本程式已成功執行
  9. }
複製代碼

  1. #include<iostream>//引入標頭檔<in & out stream>,基本輸出輸入
  2. #include<cstdlib>// 引入標頭檔<c standard library>,標準函式庫
  3. using namespace std;//指定命名空間
  4. int main()//主函式
  5. {
  6.     cout<<"hello"<<endl;
  7.     system("pause");//畫面暫停
  8.     return 0;//回傳0至主控制台,告知程式已成功執行
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    
  7.       cout<<"Hello"<<endl;
  8.       system("pause");
  9.       return 0;   
  10. }
複製代碼
回復 1# 許婷芳

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     cout<<"hello"<<endl;
  7.     system("pause");
  8.     return 0;
  9. }
複製代碼

TOP

  1. #include<iostream> //引入標頭檔 <in & out stream>,基本輸入輸出
  2. #include<cstdlib> //引入標頭檔 <c standard library>,標準程式庫
  3. using namespace std; //指定命名空間
  4. int main() //主程式
  5. {
  6.     cout<<"hello"<<endl;
  7.    system("pause"); //畫面暫停
  8.    return 0; //回傳0治主控台,告知乘勢已成功執行並結束
  9. }   
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     cout<<"hello"<<endl;
  7.     system("pause");
  8.     return 0;
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    
  7.    cout<<"hello"<<endl;
  8.    system("pause");
  9.    return 0;   
  10.    
  11. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     cout<<"hello"<<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<<"hello"<<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<<"hello"<<endl;
  7.     system("pause");
  8.     return 0;
  9. }
複製代碼

TOP

  1. #include<iostream>      // IO
  2. #include<cstdlib>       // Library
  3. using namespace std;    //指定命名空間
  4. int main()              //主函式
  5. {
  6.     cout<<"hello"<<endl; //cout輸出Hello
  7.     system("pause");     //畫面暫停
  8.     return 0;            //回傳0至主控台,告知程式已成功結束
  9. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    cout<<"hello"<<endl;
  7.   system("PAUSE");
  8.     return0
  9. }
複製代碼

TOP

本帖最後由 許婷芳 於 2020-1-21 15:30 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     cout<<"hello"<<endl;
  7.     system("pause");
  8.     return 0;
  9. }
複製代碼

TOP

返回列表