



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Input Process Output Item name (name of items) GP (gross price) Variable name GP stand for (gross price) Profit Formula: GP- price of the item before going out to the market Profit margin– increment with certain % based on the GP Net price- New price after profit margin was imposed. Condition: Use the selection control structure (if-else)
If GP<= Profit= GP * 3% NP= Gp + Profit
NP= GP + Profit Variable Name Data type GP stand for (gross price) iName stand for (item name) NP stand for (net price) Profit Float Char Float Float ***This system must read 10 different items, thus the repetation control structure such as for, while and do while will be used in the system. B. Algarithms Algarithms can be represented by using flow chart or pscudocode. C. FlowchartStart if gp<= 50 Declare the variable GP, Profit, NP, iname Read gross price Read item name
2.0 declare the variable: gross price as float, net price as float, profit as float and item name as char 3.0 read\input item name 4.0 read input gross price 5.0 start if 5.1 if1 (gross price <= 50) then 5.1.1 calculate profit ⇦ gross price * 3% 5.1.2 calculate net price ⇦ gross price + profit end if 5.2 if2 (gross price > 50 and gross price <=100) 5.2.1 5.2.1 calculate profit ⇦ gross price * 4% 5.2.2 calculate net price ⇦ gross price + profit end if 5.3 if3 (gross price > 100 and gross price <=200) 5.3.1 calculate profit ⇦ gross price * 5% 5.3.2 calculate net price ⇦ gross price + profit End if 5.4 if4 (gross price >200)
5.4.1 calculate profit ⇦ gross price * 10% 5.4.2 calculate net price ⇦ gross price + profit End if 6.0 display net price 7.0 loop (read 10 time) goto 3. 8.0 end loop 9.0 end