- #include<iostream> //引入 <基本輸入輸出> 標頭檔 in & out stream
- #include<cstdlib> //引入 <標準函式庫> 標頭檔 c standard library
- using namespace std; //指定命名空間為 std
- int main() //主函式
- {
- int score;
- cout<<"報上你的成績:";
- cin>>score;
- if(score>=60)
- {
- cout<<"恭喜你!及格了!"<<endl;
- }else
- {
- cout<<"不及格~斬!"<<endl;
- }
- system("pause"); //讓畫面暫停
- return 0; //回傳0到主控台,告知該程式已成功執行
- }
複製代碼 |