Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

atm problem

$
0
0

can anyone tell me what is wrong with this code?

include<stdio.h>

int main() { int mon; float amt,final; //printf("\n enter the amount to be withdrawn"); scanf("%d",&mon); //printf("\n enter the amount in the account") scanf("%f",&amt); if(mon%5!=0||mon>amt||mon>2000||amt>2000.00||mon<0||amt<0.00) printf("\n%.2f",amt);

else { final=amt-mon-0.50; printf("\n%0.2f",final); } return 0; }


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>