Question: while true x(a)= input('Enter a number: '); if x(a)=0 break end a=a+1; end x= (1:a1); product= prod (x); fprintf('the product is od , product); s=sum(x);

 while true x(a)= input('Enter a number: '); if x(a)=0 break end

a=a+1; end x= (1:a1); product= prod (x); fprintf('the product is od ,

while true x(a)= input('Enter a number: '); if x(a)=0 break end a=a+1; end x= (1:a1); product= prod (x); fprintf('the product is od , product); s=sum(x); fprintf ('the sum is od: ,s); m= mean (x); fprintf('the mean is of: , m); maximum= max (x); fprintf('the max is od: , maximum); minimum= min (x); fprintf('the min is of: , minimum); Modify the program from task 10 so that instead of continuing until 0 is entered, the program first prompts the user to enter how many numbers are to be entered, and then reads in exactly this many numbers (and performs the same calculations). ( denotes mandatory exercises)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!