返回列表 發帖

自我介紹(二)

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    int age=0;  //變數的宣告  數字 int=0  初始值等於0   
  7.    string school;// string 字串(中文、英文、數字、符號....)
  8.    
  9.    cout << "請輸入你的年齡" << endl;  //字串 要用""包起來
  10.    cin >> age; //輸入  18  存進age  
  11.    cout << "請輸入你的學校" << endl; //endl = 換行
  12.    cin >> school;
  13.    cout << "我是大帥哥,今年" << age << "歲" << endl;  //字串 + 變數
  14.    cout << "我讀" << school << endl;
  15.    
  16.    system("pause");
  17.    return 0;
  18. }
複製代碼

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {   
  6.    int age=0;
  7.    string school;
  8.    
  9.    cout<<"輸入age"<< endl;
  10.    cin>>age;
  11.    cout<<"輸入你的學校"<<endl;
  12.    cin>>school;
  13.    cout<<" 我今年"<<age<<"歲"<<endl;
  14.    cout<<"我讀"<<school;
  15.       
  16.    system("pause");
  17.    return 0;
  18. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    int age=0;      
  7.    string school;   
  8.    cout << "請輸入你的年齡"<<endl;
  9.    cin >> age;
  10.    cout << "請輸入你的學校" << endl;  
  11.    cin >> school;
  12.    cout << "我是戴嘉禾,今年" << age << "歲" << endl;  
  13.    cout << "我讀" << school << endl;
  14.    
  15.    system("pause");
  16.    return 0;
  17. }
複製代碼

TOP

[code]#include<iostream>
#include<cstdlib>
using namespace std;

int main()
{
     int age=0;
     string school;
     cout<<"請輸入你的年齡"<<endl;
     cin>>age;
     cout<< "請輸入你的學校"<<endl;
     cin>>school;
     cout<<"我讀"<<school<<endl;
     cout<<"今年"<<age<<"歲";
     system("pause");
     return 0;
     }

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.   int age= 10;
  7.   string school= "KAS school";
  8.   string teacher="Mrs Rylander";
  9.   cout<<"大家好我是顏可晴,我有一隻狗叫可樂他是一隻黑貴賓。"<<endl;
  10.   cout<<"age?"<<endl;
  11.   cin>>age;
  12.   cout<<"I'm "<<age<<"."<<endl;
  13.   cout<<"school?"<<endl;
  14.   cin>>school;
  15.   cout<<"I'm at"<<school<<" school."<<endl;
  16.   cout<<"Teacher?"<<endl;
  17.   cin>>teacher;
  18.   cout<<"My teacher is "<<teacher<<endl;
  19.   system("pause");
  20.   return 0;
  21. }
複製代碼

TOP

#include<iostream>  
#include<cstdlib>  
using  namespace  std;
int  main()
{
  string  school;
  int  age=0 ;
  cout<<"請輸入你的年齡 " <<endl;
  cin >> age;  
  cout<<"請輸入你的學校 " <<endl;
  cin >> school;
  cout<<"我是顏詢"<<age<<"歲" <<endl;
  cout<<"我就讀"<<age<<"school"<<endl;
  system("pause");
  return  0;   
}

TOP

  1. #include<iostream>  
  2. #include<cstdlib>  
  3. using  namespace  std;
  4. int  main()
  5. {
  6.   string  school;
  7.   int  age=0 ;
  8.   cout<<"請輸入你的年齡 " <<endl;
  9.   cin >> age;  
  10.   cout<<"請輸入你的學校 " <<endl;
  11.   cin >> school;
  12.   cout<<"我是顏詢"<<age<<"歲" <<endl;
  13.   cout<<"我就讀"<<age<<"school"<<endl;
  14.   system("pause");
  15.   return  0;   
  16. }
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    int age =0;
  7.    string scool;
  8.    cout<<"請輸入你的年齡"<<endl;
  9.    cin>>age;
  10.    cout<<"請輸入你的學校"<<endl;
  11.    cin>> scool;
  12.    cout<<"安立"<<age<<"歲"<<endl;
  13.    cout<<" 我讀明誠"<<endl;
  14.    system("pause");
  15. return 0;
  16. }         
複製代碼

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int age=0; //數字=0 //變數的宣告
  7.     string school;
  8.    
  9.     cout<<"大家好我是顏可昕"<<endl;
  10.     cout<<"請輸入年齡"<<endl;
  11.     cin>>age;//10 age   
  12.     cout<<"請輸入你的學校"<<endl;
  13.     cin>>school;
  14.     cout<<"我讀"<<school<<endl;  
  15.     cout<<"我今年"<<age<<"歲"<<endl;  
  16.     system("pause");
  17.     return 0;
  18. }
複製代碼

TOP

返回列表