Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the program from task 10 so that instead of continuing until 0 is entered, the program first prompts the user to enter how

  

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) a=1; while true x (a) input ('Enter a number: '); if x (a) == 0 break end a=a+1; end x= x (1:a-1); product prod (x); fprintf('the product is %d ',product); s=sum(x); fprintf('the sum is %d: ', s); mmean (x); fprintf('the mean is f: ', m); maximum max (x); fprintf('the max is %d: ', maximum); minimum min (x); fprintf('the min is f: ' minimum);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual C# An Introduction to Object-Oriented Programming

Authors: Joyce Farrell

7th edition

978-1337102100

More Books

Students also viewed these Programming questions

Question

Who would you consider as stakeholders for the poster exhibition

Answered: 1 week ago