whats wrong in this code?

#include
#include
using namespace std;
main()
{
int transaction;
float amount;
cin>>transaction>>amount;
if((transaction%5==0) && (transaction<(amount-0.5)))
{
cout<<setprecision (2)<<(amount-transaction-0.5);
}
else{cout<<setprecision(2)<<amount;}}

Your code is printing output in wrong format. Its printing like this-

Input
120 120.00
Your Output
`1.2e+02`
Expected Output
120.00

Store the things in a variable and then try printing that variable. IF this doesnt fix the issue, get back to us ^^

//