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
Get step-by-step solutions from verified subject matter experts
