MATLAB Programming worksheet 4
Q1. while loops
a) Write a script that asks for a series of numbers andcalculates the sum and the mean. When the user enters a value of 0,the script stops and performs the calculation. For example:
Enter a number (type 0 to end) : 5
Enter a number (type 0 to end) : 6
Enter a number (type 0 to end) : 7
Enter a number (type 0 to end) : 8
Enter a number (type 0 to end) : 0
4 numbers entered. Sum=26. Mean=6.5.
b) Write a script which allows the user to play the “what numberam I thinking of?” game. Your script
PayPal Gateway not configured
PayPal Gateway not configured