+ 2

Can anyone help me to overcome this code?I'm able to get the 3&4 test cases to be true but 1,2&5 cases are showing failed.

https://code.sololearn.com/cBMt3DEP3ydq/?ref=app

30th May 2020, 10:48 AM
Rani Devi Priyanka Gollakoti
Rani Devi Priyanka Gollakoti - avatar
6 Answers
+ 3
in your code take input from user here i taken count int price = 2000000; int cost = 3000000; int insurance = 1000000; int allCount = 10; int count =0; Take input as a count int allPrice = price * allCount + insurance - cost * count;
31st May 2020, 11:39 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
User input means is that an int order asking for the user
30th May 2020, 11:26 AM
Rani Devi Priyanka Gollakoti
Rani Devi Priyanka Gollakoti - avatar
+ 2
Thank u soo much whoever helped me to overcome my mistakes in my code.my heartfull thanks to all
31st May 2020, 11:45 AM
Rani Devi Priyanka Gollakoti
Rani Devi Priyanka Gollakoti - avatar
+ 1
You should add a user input statement, because the code coach will provide you some input in each case. Then, your total cost is always the same (ten hovercrafts for $ 2mn each plus $ 1mn insurance), and your sales revenue changes in each test case ($ 3mn for each unit sold).
30th May 2020, 11:19 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
0
1.give input by scanner... 2.multiply that input by both original cost and the selling cost.(but not the insurance) 3.Your if else condition checks both >= and<= for same input that means the Break Even will never print
30th May 2020, 11:37 AM
sid
sid - avatar
0
Change the <= and >= of if else to < and > and try again
30th May 2020, 11:37 AM
sid
sid - avatar