Final answer:
To create a Raptor program that finds the sum of positive and negative numbers entered by the user, you'll need to use a loop to continue reading numbers until the user enters 0. Within the loop, you can check if the number is positive or negative and add it to the respective accumulator variable.
Step-by-step explanation:
To create a Raptor program that finds the sum of positive and negative numbers entered by the user, you'll need to use a loop to continue reading numbers until the user enters 0. Within the loop, you can check if the number is positive or negative and add it to the respective accumulator variable.
Here's an example of how the Raptor code would look like:
- Set the positive accumulator variable to 0.
- Set the negative accumulator variable to 0.
- Start a loop that continues until the user enters 0.
- Read a number from the user.
- If the number is greater than 0, add it to the positive accumulator.
- If the number is less than 0, add it to the negative accumulator.
- Repeat steps 4-6 until the user enters 0.
- Output the values of the positive and negative accumulator variables.
Remember to use the correct syntax and logic in your Raptor program. This program will correctly find the sum of positive and negative numbers entered by the user.