TOPIC

can u find my problem. please. wrong ans (20%)

engrjuelrana asked 1 year ago

include include

using namespace std;

int main() {

double a,temp=0,sub; cin>>a;

cout<<setprecision(2)<<fixed;

if(a>= 0.0 && a<= 2000.00) cout<<"Isento"<<endl; else if(a> 2000.00 && a<= 3000.00){ cout<<"R$ 80.00"<<endl; }

else if(a> 3000.00 && a<= 4500.00) {

sub = a - 3000.00; temp= ((sub * 18)/100)+80.00; cout<<"R$ "<<temp<<endl;

}

else if(a> 4500.00) { a = a - 3000.00; if(a>1500){ a = a - 1500; temp =(a*28)/100;

} cout<<"R$ "<<temp+350.00<<endl; //because of 270+80 = 350 ... 270 is 18% and 80 is 8% :)

}

return 0;

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.