Use loop structure to solve the Problem Set 3 for EC487 Advanced Microeconomics

is just quantity.