Write the pseudocode to produce a bill for cell phone charges. Data fields will include date, number called, number of minutes, and cost (rate × minutes). Data should be loaded into an array. Include totals for the number of minutes and cost.

Write the pseudocode to produce a bill for cell phone charges. Data fields will include date, number called, number of minutes, and cost (rate × minutes). Data should be loaded into an array. Include totals for the number of minutes and cost.

  1.  

Answer:

Calculate-Phone_Bill

Begin

Int date [n] , number_called [n] , min[n] , cost [n]

Int n, Rate, TotalCost, TotalMin

Print (“Enter Total # of Entries in Data:”)

Accept n from User

Print (“Enter Rate of Call for Per Min:”)

Accept Rate from User

For i = 0 to n-1:

Begin

Accept Date in Date=[i]

Accept Number in Number_Call[i]

Accept No_of_minutes in Min [i]

Calculate Cost [i] = Min[i] * Rate

Load it into Cost [i]

End for

For i = 0 to n-1:

TotalCost = TotalCost + Cost [i]

TotalMin = TotalMin + min[i]

End for

Print (” Total Minutes:”, TotalMin)

Print (“Total Cost:”, TotalCost)

End

Order a similar paper

Get the results you need