標題:
自我介紹(二)
[打印本頁]
作者:
歐柏罕
時間:
2017-11-4 17:16
標題:
自我介紹(二)
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int age=0; //變數的宣告 數字 int=0 初始值等於0
string school;// string 字串(中文、英文、數字、符號....)
cout << "請輸入你的年齡" << endl; //字串 要用""包起來
cin >> age; //輸入 18 存進age
cout << "請輸入你的學校" << endl; //endl = 換行
cin >> school;
cout << "我是大帥哥,今年" << age << "歲" << endl; //字串 + 變數
cout << "我讀" << school << endl;
system("pause");
return 0;
}
複製代碼
作者:
蔡佳承
時間:
2017-11-4 17:24
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int age=0;
string school;
cout<<"輸入age"<< endl;
cin>>age;
cout<<"輸入你的學校"<<endl;
cin>>school;
cout<<" 我今年"<<age<<"歲"<<endl;
cout<<"我讀"<<school;
system("pause");
return 0;
}
複製代碼
作者:
戴嘉禾
時間:
2017-11-4 17:24
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int age=0;
string school;
cout << "請輸入你的年齡"<<endl;
cin >> age;
cout << "請輸入你的學校" << endl;
cin >> school;
cout << "我是戴嘉禾,今年" << age << "歲" << endl;
cout << "我讀" << school << endl;
system("pause");
return 0;
}
複製代碼
作者:
佳
時間:
2017-11-4 17:28
[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;
}
作者:
顏可晴
時間:
2017-11-4 17:31
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int age= 10;
string school= "KAS school";
string teacher="Mrs Rylander";
cout<<"大家好我是顏可晴,我有一隻狗叫可樂他是一隻黑貴賓。"<<endl;
cout<<"age?"<<endl;
cin>>age;
cout<<"I'm "<<age<<"."<<endl;
cout<<"school?"<<endl;
cin>>school;
cout<<"I'm at"<<school<<" school."<<endl;
cout<<"Teacher?"<<endl;
cin>>teacher;
cout<<"My teacher is "<<teacher<<endl;
system("pause");
return 0;
}
複製代碼
作者:
顏詢
時間:
2017-11-4 17:34
#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;
}
作者:
顏詢
時間:
2017-11-4 17:35
#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;
}
複製代碼
作者:
黃安立
時間:
2017-11-4 17:36
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int age =0;
string scool;
cout<<"請輸入你的年齡"<<endl;
cin>>age;
cout<<"請輸入你的學校"<<endl;
cin>> scool;
cout<<"安立"<<age<<"歲"<<endl;
cout<<" 我讀明誠"<<endl;
system("pause");
return 0;
}
複製代碼
作者:
顏可昕
時間:
2017-11-4 17:38
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int age=0; //數字=0 //變數的宣告
string school;
cout<<"大家好我是顏可昕"<<endl;
cout<<"請輸入年齡"<<endl;
cin>>age;//10 age
cout<<"請輸入你的學校"<<endl;
cin>>school;
cout<<"我讀"<<school<<endl;
cout<<"我今年"<<age<<"歲"<<endl;
system("pause");
return 0;
}
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/)
Powered by Discuz! 7.2