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!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 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 Réponse
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