test case 1:
the value of x is 10.92
7/25/2017 5:14:07 PM
That makes no sense.... what are 12.5 and 14.5 in the test case?
You've posted at least five basic questions in a short time. All of them with a single test case, and zero lines of code. Are you asking us to help you learn, or just to do your homework?
the first input is an float which corresponds to n the 2nd is an float which corresponds to p.the output shld have the float values are displayed correct to 2 decimal places.
n × cost = x × (cost × (1 + profit)) ==> x = n / ( 1 + profit )
You can check this using your values.
I will not post any code until you prove you made the least effort to solve it on your own...
Send us a message