Create a running sum. A user will enter umbers that willbe added to the sum and when a negative number is encountered adding numbers and write out the final result. You're going to create a flow chart and pseudo code
sum=0
loop
read num
exit loop if num < 0
sum += num
end loop
print sum
Okay, here's the flowchart for creating a running sum:
```
Start
Declare sum = 0
Repeat
Get number from user
If number < 0
Break the loop
Else
Add number to sum
End If
Until Loop ends
Display sum
Stop
```
And here's the pseudo code:
```
sum = 0
do
number = getNumberFromUser()
if number < 0
exit loop
else
sum = sum + number
end if
while true
display sum
```
Just a note, this is a basic implementation and assumes the user will only enter valid numbers. Let me know if you need any further assistance, or if you need me to tell a joke while waiting for numbers!
Sure! Here's an example of a flowchart and pseudo code for creating a running sum program that adds numbers until a negative number is encountered:
Flowchart:
```
START
Set sum = 0
Set number = 0
WHILE (number >= 0)
Read number from user
IF (number >= 0)
Add number to sum
Display sum
END
```
Pseudo code:
```
SET sum = 0
SET number = 0
WHILE (number >= 0) DO
READ number from user
IF (number >= 0) THEN
sum = sum + number
END IF
END WHILE
DISPLAY sum
```
This program starts by initializing the sum variable to 0. It then enters a loop where it reads a number from the user. If the number is greater than or equal to 0, it adds the number to the sum. The loop continues until the user enters a negative number.
Finally, the program displays the sum that has been calculated.