Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main(){
- float value;
- float balance;
- scanf("%f", &value);
- scanf("%f", &balance);
- if(fmod(value, 5)==0 && balance-value-0.5>=0){
- printf("%.2f", balance-value-0.5);
- }
- else
- {
- printf("%.2f", balance);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement