#include
#include
#include<stdio.h>
using namespace std;
class payment
{
public:
int taken;
double total;
double multiplicity()
{
cin>>taken;
cin>>total;
if(int(taken) %5==0)
{
if(taken>total)
{
printf("%.2f",total);
}
else
{
printf("%.2f",total - taken - 0.50);
}
}
else
{
printf("%.2f",total);
}
}
};
int main()
{
payment p1;
p1.multiplicity();
}
this is my code.
All test cases seem to run perfectly.
Still wrong answer.
Please help