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

problem ATM Wrong answer

$
0
0
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    int amt;
    float bal;
    cin>>amt>>bal;
    if(amt%5==0&&amt<bal)
    {
        bal=bal-amt-0.50;
    }

    printf("%0.2f",bal);
    return 0;
}

Viewing all articles
Browse latest Browse all 40121

Trending Articles