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

ATM compiler c4.3.2

$
0
0
#include<stdio.h>

int main()

{
    float x;
    int y;
    scanf(%d",&y);
        scanf("%f",&x);
    if(y%5==0&&(x-y)>0.5)

        printf("%0.2f",(x-(y+0.5)));

    else if(y%5!=0&&(x-y)>0.5)

        printf("%0.2f",x);

    else

        printf("%0.2f",x);

    return 0;
}

Please suggest what is wrong woth this source code?


Viewing all articles
Browse latest Browse all 39796

Trending Articles



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