✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Ви берете участь у перевірці коду і помітили проблему в наступному фрагменті псевдокоду (*** означає коментар).
*** this pseudo-code calculates the average sales per month achieved by an organization ***0 program SALES1 month_counter, sales_in_month, total_sales, fileID,: integer2 average_sales: float3 begin4 *** open the sales file***5 fileID = open file ( “Sales” )6 If (fileID = 0) then7 *** File cannot be opened***8 Display error message 3339 Else10 *** get the number of months you want to consider11 Read (number_of_months)12 month_counter = 113 while month_counter <= number_of_months loop14 *** get sales for month from sales file using the GetSales function***15 sales_in_month = GetSales (month_counter, FileID)16 *** add the sales to the total***17 total_sales = total_sales + sales_in_month18 month_counter = month_counter + 119 endloop20 *** calculate the average monthly sales and output that value***21 average_sales = total_sales / number_of_months22 Write (average_sales)23 Endif 24 end program SALES
Яка з наведених нижче проблем присутня в цьому фрагменті?