logo CodeStepByStep logo

SentinelSum

Write a complete program in a module named SentinelSum with a Main subroutine that prompts the user for numbers until the user types -1, then outputs the sum of the numbers. Here is an example output:

Type a number: 10
Type a number: 20
Type a number: 30
Type a number: -1
Sum is 60
Function: Write a VB function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.