Can anyone tell me why m not passing test cases after passing 1 and 2? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone tell me why m not passing test cases after passing 1 and 2?

#include <iostream> #include <cmath> using namespace std; int main() { float dollarBills = 0; float totalHouse = 0; cin >> totalHouse; if(!totalHouse>=3) cout << "Please enter an input greater than or equal to 3" <<endl; dollarBills = round((3 / 2 * 2 * 100) / totalHouse); cout << dollarBills << endl; return 0; }

25th Dec 2019, 11:03 AM
Iraz Irfan
Iraz Irfan - avatar
3 Answers
0
if (! (totalHouse>=3)).......
25th Dec 2019, 11:22 AM
ycsvenom
ycsvenom - avatar
0
The number inside round is constant why you just typed 300?
25th Dec 2019, 11:24 AM
ycsvenom
ycsvenom - avatar
0
Thanks for replying But I just need to use ceil instead of round
25th Dec 2019, 1:13 PM
Iraz Irfan
Iraz Irfan - avatar