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

https://www.codechef.com/problems/HS08TEST

$
0
0

Whenever run this code i get wrong answer can someone help me in notifying the error: code:

include<iostream>

include<iomanip>

using namespace std; int main() { int x,i; float bal; cout<<"\nEnter the balance amount"; cin>>bal; cout<<"\nEnter withdraw amount"; cin>>x; if(x%5==0 && x+0.5<bal) { bal=bal-x-0.50; cout<<setprecision(2)<<bal; } else cout<<setprecision(2)<<bal; 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>