Skip to content

Commit d0cc768

Browse files
Create atm.cpp
1 parent b0396a5 commit d0cc768

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

atm.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <stdio.h>
2+
#include <string.h>
3+
4+
5+
6+
int main()
7+
{
8+
9+
int x;
10+
float y;
11+
scanf("%d %f", &x, &y);
12+
if (x <= (y - 0.5) && x%5 == 0){
13+
printf("%.2lf", y - x - 0.5);
14+
}else{
15+
printf("%.2lf", y);
16+
}
17+
18+
return 0;
19+
}

0 commit comments

Comments
 (0)