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!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 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 Resposta
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