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
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
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...
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;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F40fd1737-b499-4969-b8a1-2e8bce8ef321%2F5c9d22bf-dd7e-4038-b6d4-2cb0bb9e33ba%2Frk9athi_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr