Board logo

標題: 我的第一支程式 [打印本頁]

作者: tonyh    時間: 2016-8-2 11:25     標題: 我的第一支程式

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

作者: 林政昕    時間: 2016-8-2 15:58

  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. }
複製代碼

作者: 沈子耘    時間: 2016-8-2 15:59

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

作者: 許博堯    時間: 2016-8-2 15:59

  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. }  
複製代碼

作者: 許紘誌    時間: 2016-8-2 16:00

  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. }
複製代碼

作者: 洪巧芸    時間: 2016-8-2 16:00

  1. #include<iostream>  
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. cout<<"Hellow I am the computer!Nice to meet you!"<<endl;   
  7. system("pause");
  8. return 0;
  9. }
複製代碼

作者: 曾堂桂    時間: 2016-8-2 16:00

  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. }
複製代碼

作者: 宋秉軒    時間: 2016-8-2 16:02

  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. }
複製代碼

作者: 黃謙儒    時間: 2016-8-2 16:03

  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. }
複製代碼

作者: 翁苡熏    時間: 2016-8-2 16:04

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

作者: 楊采真    時間: 2016-8-2 16:06

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

作者: 許娟慈    時間: 2016-8-2 16:08

本帖最後由 許娟慈 於 2016-8-2 16:09 編輯

  1. #include<iostream>//引入標頭檔<in&ut stream>,基本輸入出
  2. #incude<cstdlib>//引入標頭檔<c stantared library>,標準函式庫
  3. using namespacestd;//主函式
  4. [
  5.      cout<<"hello"<<endl;
  6.      system("pause");  //畫面暫停
  7.      return0;          //回傳0至主控台告知程式已成功執行並結束
  8.       
複製代碼

作者: 鍾瀚磊    時間: 2016-8-2 16:13

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     cout<<"你好,歡迎使用此程式"<<endl;
  7.     system("pause");
  8.     return 0;
  9. }   
複製代碼

作者: 許博堯    時間: 2016-8-2 19:54

  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. }
複製代碼

作者: 謝東宏    時間: 2016-8-2 20:55

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





歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/) Powered by Discuz! 7.2