Write a program to find the sales price of an item given an original price and a percentage discount. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Write a program to find the sales price of an item given an original price and a percentage discount.

sales price =original price -discount, original price =730, discount=10%

25th Mar 2017, 7:42 PM
Tehreem
1 Answer
0
#include <iostream> using namespace std; int main (){ float op, dis, sp; cout <<"Enter original price: ";cin>>op; cout <<"Enter discount (%) : ";cin>>dis; sp = op - (op*dis/100); cout <<"Sales price: ";cin>>sp; }
25th Mar 2017, 7:47 PM
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender)
เคฆเฅ‡เคตเฅ‡เค‚เคฆเฅเคฐ เคฎเคนเคพเคœเคจ (Devender) - avatar