ATM beginner problem... why it is wrong?

#include<stdio.h>
int main()
{
int amt;
double bal,rem_bal;

scanf("%d “,&amt);
scanf(”%lf ",&bal);

if(amt%5==0)
{
if(amt<bal && ((amt+0.5)<=bal))
{
rem_bal=bal-(int)amt-(0.5);
printf("%l",rem_bal);

}
else
{
    
printf("%lf",bal);

}

}

else
{
printf("%lf",bal);
}
return 0;
}

It is better to provide a link to the problem you are referring to

No it is fine see the problem
https://www.codechef.com/problems/HS08TEST

here is the problem printf("%l",rem_bal); change %l to %lf

1 Like

yup my bad! :laughing:

1 Like

I submitted it correctly…and now .doing the beginner section…if any prob arise can I ask?

1 Like

yeah, that’s why the discussion forum exists :smiley: