# Calculate Annual Cost

7 Pages844 Words174 Views
|
|
|
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

## End of preview

Want to access all the pages? Upload your documents or become a member.

### Support

#### +1 306 205-2269

Chat with our experts. we are online and ready to help.