Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions