Question: The following flowchart presents an algorithm of a program that counts the number of positive and negative numbers entered by the user. The user will

The following flowchart presents an algorithm of a program that counts the number of positive and negative numbers entered by the user. The user will enter 30 numbers. Translate the flowchart into its corresponding C++ program using an appropriate loop statement.

The following flowchart presents an algorithm of a program that counts the

Write your code in the incomplete program given below:

#include

using namespace std;

int main()

{

int count = 0; //The total count of numbers entered

int positive = 0; //The count of positive numbers int negative = 0; //The count of negative numbers int number; //The number entered

 //Write your code here //... //... //... 

return 0;

}

Start count = 0 positive= 0 negative = 0 False count 0 positive = positive + 1 False True negative = negative + 1 number

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!