Define Global Real Insurance

Added on -2019-09-24

| 7 pages
| 844 words
| 174 views

Trusted by 2+ million users,
1000+ happy students everyday

Showing pages 1 to 3 of 7 pages

Problem 1VariablesReal LOAN = 0.00Real INSURANCE = 0.00Real GAS = 0.00Real OIL = 0.00Real TIRES = 0.00Real MAINTAINENCE = 0.00Real MONTHLYCOSTReal ANNUALCOSTIPOInput(s)Process(es) Output(s)LoanInsuranceGasOilTiresMaintainenceMonthlycost = Loan + Insurance + Gas + Oil + Tires + MaintainenceAnnualcost = Monthlycost *12MonthlycostAnnualcostPseudocodeStart1.Define global Real loan = 0.002.Define global Real insurance = 0.003.Define global Real gas = 0.004.Define global Real oil = 0.005.Define global Real tires = 0.006.Define global Real maintainence = 0.007.8.Module main()9. Call setExpenses()10. monthlycost = getMonthlyCost()11. annualcost = getAnnualCost(monthlycost)12. Call display()
13. End Module14.15. Module setExpenses()16. Set loan = quantity(“Enter Loan payment“)17. Set insurance = quantity(“Enter insurance“)18.Set gas = quantity(“Enter Gas“)19. Set oil = quantity(“Enter oil“)20. Set tires = quantity(“Enter Tires“)21. Set maintainence = quantity(“Enter Maintainence“)22.End Module23.24.Module getMonthlyCost()25. Set monthlycost = loan+insurance+gas+oil+tires+maintainence26. Return monthlycost27.End Module28.29.Module getAnnualCost(Real monthlycost)30. Set annualcost = monthlycost*1231. Return annualcost32.End Module33.34.Module display()35. Display “Monthly cost $”,monthlycost36. Display “Annual cost $”,annualcost37.End ModuleEnd
IPO FlowchartgetMonthlyCost ()getMonthlyCost ()Set monthlycost = loan+insurance+gas+oil+tires+maintainenceSet monthlycost = loan+insurance+gas+oil+tires+maintainenceReturn monthlycostReturn monthlycostEndEndsetExpenses ()GLOBAL VARIABLESDefine global Real loan = 0.00Define global Real insurance = 0.00Define global Real gas = 0.00Define global Real oil = 0.00Define global Real tires = 0.00Define global Real maintainence = 0.00Set loan = quantity(“EnterLoan payment“)Set loan = quantity(“EnterLoan payment“)Set loan = quantity(“EnterLoan payment“)main()Set loan = quantity(“EnterLoan payment“)Call setExpenses()Set loan = quantity(“EnterLoan payment“)monthlycost =getMonthlyCost()Set loan = quantity(“EnterLoan payment“)annualcost =getAnnualCost(monthlycost)EndCall display()End

Found this document preview useful?

You are reading a preview
Upload your documents to download
or
Become a Desklib member to get accesss

Students who viewed this