【发布时间】:2018-04-05 18:25:36
【问题描述】:
//Ask the user to start the program (the outer loop)
output “To begin, enter Y or y. To end the program, enter the letter N:”
input getUserDecision
//如果用户输入Y或y,外循环开始 while (getUserDecision = "Y") OR (getUserDecision = "y")
//Get the product names and costs
//Can enter up to 10 products and their cost
for num count = 0 to 9 Step 1 //Declare count here
output “Enter product name:” //Prompt user
input productName[count] //Input product name
output “Enter product cost: $” //Prompt user
input productCost[count] //Input product price
end for
【问题讨论】:
-
代码是否与您的问题相关?
标签: multidimensional-array parallel-arrays