The cost prize of n articles is the same as the selling prize of x articles.if the profit is p% then what is the value of x? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

The cost prize of n articles is the same as the selling prize of x articles.if the profit is p% then what is the value of x?

test case 1: 12.5 14.5 output the value of x is 10.92

25th Jul 2017, 5:14 PM
MADHU MITHA K
MADHU MITHA K - avatar
5 Answers
0
That makes no sense.... what are 12.5 and 14.5 in the test case?
25th Jul 2017, 5:17 PM
Bogdan Sass
Bogdan Sass - avatar
0
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?
25th Jul 2017, 5:21 PM
Bogdan Sass
Bogdan Sass - avatar
0
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.
25th Jul 2017, 5:21 PM
MADHU MITHA K
MADHU MITHA K - avatar
0
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...
25th Jul 2017, 6:09 PM
Bogdan Sass
Bogdan Sass - avatar
0
thanks bogdan.....
26th Jul 2017, 12:56 AM
MADHU MITHA K
MADHU MITHA K - avatar