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

ATM C Runtime Error

$
0
0
 #include <stdio.h>
    #include <stdlib.h>

    int main() {

        int WDAMT;
        float BAL;

        scanf("%d",&WDAMT);
        scanf("%f",&BAL);
            if(WDAMT%5 ==0 && (BAL-WDAMT) >= 0.5){
                printf("%.2f\n",BAL-WDAMT-0.5);
            }else
                printf("%.2f\n", BAL);

    }

Can any one suggest why the run time error is occuring


Viewing all articles
Browse latest Browse all 40121

Latest Images

Trending Articles



Latest Images

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