...CMIS 102 6382 September 28, 2014 A. Problem Analysis • The purpose of the program is to calculate the area ,perimeter and diagonal length of a rectangle with dimensions (Length and width) are provided by a user. • Input the values of length and width from the user • For finding the area, the calculation is length * width • For the perimeter, calculation is (length + width) * 2 . • For finding the diagonal length , the formula is sqrt( length*length + width* width) B. Program Design Input/Output The program will prompt user to input: • Legth • Width Calculate the area • Area= length * width • Display the area Calculate the perimeter • Perimeter =( length + width) * 2 . • Display the perimeter Calculate the diagonal length • diagoanllength = sqrt( length*length + width* width) • Display the diagonal length Pseudo Code Start Declare the variables length, width, area, perimeter, diagoanlLength as double GetInput() CalcArea() CalcPerimeter() CalcDiagonalLength() Stop Function GetInput() Display “Enter the length and width “ Accept length, width End Function Function CalcArea() area= length * width Display “The Area is :”,area End Function Function CalcPerimeter() perimeter = (length + width) * 2 Display “The Perimeter is :”, perimeter End Function Function CalcDiagonalLength() diagoanlLength...
Words: 470 - Pages: 2
...1) Total Revenue | $120,000 | | Salary Forgone | $50,000 | | Employee’s wages | 40,000 | | Loss on Rent | $10,000 | per year | Material Cost | 15,000 | | Lost return on savings (5%) | $ 1,000 | per year | Rental of Equipment | 5,000 | | Savings invested in business | $20,000 | | a) | | | | | | | Economic Costs | $121,000 | | | | | Accounting Costs | 60,000 | | | | | b) | | | | | | | Accounting Profit | $60,000 | | | | | C) | | | | | | | Economic Profit | ($1,000) | | | | | d) | | | | | | | No, because she is forgoing the rent income she would have been earning before she started her own business | | 2) | Fixed Cost | Marginal Cost | Variable Costs | | | Small Plant | $10,000 | $2.00 | $12,000 | | | | Medium Plant | $15,000 | $1.40 | $12,600 | | | | Large Plant | $25,000 | $0.50 | $9,000 | | | | a) | | | | | | | Average Cost of Production | | | | Clock Radios | 6000 | 9000 | 18000 | | | | Small Plant | $3.67 | $3.11 | $2.56 | | | | Medium Plant | $3.90 | $3.07 | $2.23 | | | | Large Plant | $4.67 | $3.28 | $1.89 | | | | b) | | | | | | | 6000 Units - Small Plant | | | | | | | 9000 Units - Medium Plant | | | | | | | 18000 Unit - Large Plant | | | | | | | c) | | | | | | | In the short run the average total cost of producing 18000 units at $2.23 a unit in a medium plant is $40,140...
Words: 1166 - Pages: 5