Question: Using matlab program Program 2: (Powers of 7): Using loops write a function named powersOf7 that prints out powers of 7; that is 1, 7,

Using matlab program  Using matlab program Program 2: (Powers of 7): Using loops write

Program 2: (Powers of 7): Using loops write a function named powersOf7 that prints out powers of 7; that is 1, 7, 49, 343, up to a limit n. n is a number that is read from the user using 'input' function. If n is a negative number, print out 'Error: please input a positive number!' (11 points) Example: powersOf7 (-3) 'Error: please input a positive number! powersOf7 (0) no (i.e. empty) output powersOf7 (20000)1,7, 49, 343, 2401, 16807

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!