Skip to content

Commit 1804826

Browse files
authored
Create HS08TEST.cpp
1 parent b15836f commit 1804826

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Codeshef/HS08TEST.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include <iostream>
2+
using namespace std;
3+
int main(){
4+
int amt;
5+
double balance;
6+
cin>>amt;
7+
cin>>balance;
8+
9+
if(amt<=(balance-0.50)){
10+
if((amt%5)==0){
11+
balance = (balance-amt)-0.50;
12+
cout<<balance;
13+
}
14+
else{
15+
cout<<balance;
16+
}
17+
18+
}
19+
else{
20+
cout<<balance;
21+
}
22+
23+
return 0;
24+
}

0 commit comments

Comments
 (0)