Question

5. Randomly generate a 3 digits number. Extract these 3 digits, add them up and display the sum. For example, if the number generated is 357, digits extracted will be 3, 5 and 7, display the sum 15. (357: 3+5+7=15)

Fig: 1