program to counting in a while loopthe script


Program to Counting in a while loop:

The script initializes variable counter to 0. Then, in the while loop action, each and every time the user successfully enter a number, the program increments the counter variable. At the finish of the script, it prints the number of numbers which were entered.

 

>> countposnum

Enter a positive number: 4

You entered a 4.

Enter a positive number: 8

You entered a 8.

Enter a positive number: 11

You entered a 11.

Enter a positive number: -4

Thanks, you entered 3 positive numbers

 

Request for Solution File

Ask an Expert for Answer!!
Applications of MATLAB: program to counting in a while loopthe script
Reference No:- TGS0174924

Expected delivery within 24 Hours