I’m a beginner to cp usually my code is giving correct output but usually shows as wrong answer like this.
question code HS08TEST
#include
using namespace std;
#include
int main() {
int wcash;
float charge,out , bal;
charge=0.50;
cin>>wcash>>bal;
if(wcash%5==0 && wcash<bal+0.50)
{
out=bal-wcash;
out=out-charge;
cout<<fixed<<setprecision(2)<<out<<endl;
}
else{
cout<<fixed<<setprecision(2)<<bal<<endl;
}
return 0;
}