2013年11月8日 星期五

#include<iostream> 
#include<cstdlib> 
using namespace std;
 main()
 {
int a;
 cout<<"你答對的題目有多少題?"<<endl;
 cin>>a;
 cout<<"你的分數是:";
if(a<=10)
 {
 cout<<a*6<<endl;
 }
 else if(a<20)
 {
 cout<<10*6+(a-10)*2<<endl;
 }
 else if(a<39)
 {
 cout<<80+(a-20)*1<<endl;
 }
 else
 {
 cout<<60+40<<endl;
 }
 }

沒有留言:

張貼留言