You are on page 1of 2

Lesson 02: Computer Program Assignment

Andre Rutledge
Progrmg Lang Cncpt
Professor M. Espinosa
September 7 20!"
#o ma$e a profit a local store mar$s up t%e prices of its items b& a certain percentage. 'rite a
C(( program t%at reads t%e original price of t%e item sold t%e percentage of t%e mar$ed)up
price and t%e sales ta* rate. #%e program t%en outputs t%e original price of t%e item t%e
percentage of t%e mar$)up t%e store+s selling price of t%e item t%e sales ta* rate t%e sales ta*
and t%e final price of t%e item. ,#%e final price of t%e item is t%e selling price plus t%e sales ta*.-
.include /iostream0
using namespace std 1
int main ,-
2
float org3p percent ta* sp 1
cout // 4Enter t%e original Price of 5tem: 4 1
cin 00 org3p 1
cout // 4Enter t%e Percentage of mar$ed)up Price: 4 1
cin 00 percent 1
cout // 4Enter t%e Sales #a* Rate: 4 1
cin 00 ta* 1
cout // 46n Pa&ment 7ill6n ))))))))))))6n4 1
cout // 48rginal Price : 4 // org3p 1
cout // 46nMar$)up Percentage: 4 // percent // 4 94 1 sp : org3p ), org3p ;, percent < !00 --1
cout // 46nSelling Price : 4 // sp 1
cout // 46nSales #a* Rate : 4 // ta* // 4 94 1
cout // 46nSales #a* Amount : 4 //, sp ;, ta* < !00 --1
cout // 46n))))))))))))))))))))))))4 1
cout // 46nPa&able Amount :4 // sp (, sp ;, ta* < !00 --1
cout // 46n))))))))))))))))))))))))4 1 return 0 1
=
<; 8>#P>#
Enter t%e original Price of 5tem: ?0
Enter t%e Percentage of mar$ed)up Price: "
Enter t%e Sales #a* Rate: @ Pa&ment 7ill
))))))))))))
8rginal Price : ?0
Mar$)up Percentage: " 9
Selling Price : @7.?
Sales #a* Rate : @ 9
Sales #a* Amount : 2.AA
))))))))))))))))))))))))
Pa&able Amount :?0."A
))))))))))))))))))))))))
;<

You might also like