URI Online Judge | 1010 Simple Calculate

Problem:
https://www.urionlinejudge.com.br/judge/en/problems/view/1010
Solution:
Here I have used array and for loop and defines the array index inside the for loop and while adding the output there i have added the value from array index

Code: