#include<iostream>
#include<cctype>
using namespace std;
int main()
{
double tvarps;
cout << "Enter your tvarps: ";
cin >> tvarps;
//cout << tvarps;
while (tvarps > 0.0 && !isdigit(tvarps))
{
cout << "The tvarps is : $ ";
if(tvarps >=38000)
cout << (tvarps -35000) *0.2 + 20000*0.15 + 10000*0.10 <<endl;
if(tvarps >15000 && tvarps <=35000)
cout << (tvarps - 15000) * 0.15 + 10000* 0.10<<endl;
if(tvarps > 10000 && tvarps <=15000)
cout << (tvarps - 10000) * 0.1 <<endl;
if(tvarps <= 5000)
cout << "you needn't jiaoshui";
cout << "Please enter the next : " ;
cin >> tvarps;
}
return 0;
}
6.5c++ prohomework
最新推荐文章于 2024-09-15 11:40:06 发布