Use cin to read integers from input until 99 is read. For each remaining integer read before 99, if the integer is negative, output the integer followed by a newline and increment countOfSelected. Ex: If the input is -16 7 -9 99, then the output is: -16 -9 Negative integers appear 2 time(s) 1 #include 2 using namespace std; 3 4 int main() { 5 6 7 8 9 10 11 12 13} int inputData; int countOfSelected; /* Your code goes here */ cout<<"Negative integers appear << countOfSelected << " time(s)" << endl; return 0; "1

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 17RQ: When you perform arithmetic operations with operands of different types, such as adding an int and a...
icon
Related questions
Question

In C++ please

Use cin to read integers from input until 99 is read. For each remaining integer read before 99, if the integer is negative, output the
integer followed by a newline and increment countOfSelected.
Ex: If the input is -16 7-9 99, then the output is:
-16
-9
Negative integers appear 2 time(s)
1 #include <iostream>
2 using namespace std;
3
4 int main() {
5
6
7
8
9
10 cout<<"Negative integers appear
11
12
return 0;
13}
int inputData;
int countOfSelected;
/*Your code goes here */
countOfSelected << " time(s)" << endl;
Transcribed Image Text:Use cin to read integers from input until 99 is read. For each remaining integer read before 99, if the integer is negative, output the integer followed by a newline and increment countOfSelected. Ex: If the input is -16 7-9 99, then the output is: -16 -9 Negative integers appear 2 time(s) 1 #include <iostream> 2 using namespace std; 3 4 int main() { 5 6 7 8 9 10 cout<<"Negative integers appear 11 12 return 0; 13} int inputData; int countOfSelected; /*Your code goes here */ countOfSelected << " time(s)" << endl;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr