C++ | Sololearn: Learn to code for FREE!

0

C++

A supermarket has launched a campaign offering a 15% discount on 3 items. Write a program that takes the total price for every purchase as input and outputs the relevant discount. Sample Input 15000 4000 6700 Sample Output 2250 600 1005 Explanation 2250 represents a 15% discount for a 15000 purchase; 600 for 4000 and 1005 for 6700 accordingly. Ik I asked this yesterday still don’t got a answer though.

c++

9/21/2021 12:35:16 PM

Mando

9 Answers

New Answer

+2

Please, firstly show your attempt. After that ask what your problem is. Thanks for understanding. Happy coding!

+2

Take 3 respective inputs, calculate their discount by this formula -: 15(15% discount given in question)/100 * each respective item

+1

Rellot's screwdriver I see now. Thanks!

+1

Mando your code has a lot of small errors. learn the C++ course again to get what you're doing.

+1

Mando It looks you made some syntax error. For example in "totalprice-totalpirce". Check it. Then it must work. I hope, it helps. Happy coding!

+1

Try not to post the whole challenge as one question

+1

Would completing the C++ tutorial help?

0

mesarthim #include <iostream> using namespace std; int main() { int purchesAmount = 0; int totalpirce; do{ cout << "totalprice * 0.15"<< endl; } while (purchesAmount/15 ); return 0; }

0

mesarthim he did showed his attempt in his yesterday post, he said he asked this yesterday. https://www.sololearn.com/Discuss/2886351/?ref=app