Write an algorithm to find sum of given data values until negative value is entered
Added by Elizabeth A.
Step 1
Initialize a variable called 'sum' to store the sum of the data values, and set it to 0. Show more…
Show all steps
Your feedback will help us improve your experience
Tavis Lam and 61 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
write algorithm to calculate sum and difference of any two numbers
Donna D.
Write pseudo code that will calculate running SUM; A user will enter numbers that will be added to the sum and when negative number is encountered, stop adding numbers and write Out the final result:
Nick C.
Write an algorithm using pseudocode to input numbers . reject any numbers that are negative and count how many numbers are positive . when the number zero is input the process ends and the count of positive numbers is output .
Madhur L.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
100,000+
Students learning Computer Science with Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD