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

What's Wrong with this code?

$
0
0
#include "stdio.h"

int main()
{

    float initial;
    int amount;
    scanf("%d%f",&amount, &initial);

    if(amount<initial && amount%5 == 0)
        printf("%0.2f", initial-amount-0.50);
    else
        printf("%0.2f", initial);

    return 0;
}

Viewing all articles
Browse latest Browse all 40121

Trending Articles



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