Question: Using a `while' loop write a program that sums the numbers from 1 to N where N is a positive integer input by the user.

Using a `while' loop write a program that sums the numbers from 1 to N where N is a positive integer input by the user. Output an error message if the number is neither an integer nor positive. Write a program that sums the numbers from 1 to 100 two ways, rst by summing a single vector of appropriately chosen numbers, and second, by summing two appropriately chosen vectors.

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!