Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

challenge activity 4.3.4: While loops with numbers. Use cin to read integers from input until -99 is read. For each remaining integer read before -99,

challenge activity

4.3.4: While loops with numbers.

Use cin to read integers from input until -99 is read. For each remaining integer read before -99, if the integer is positive, output the integer followed by a newline and increment countOfSelected.

Ex: If the input is -22 21 4 -99, then the output is:

21 4 Positive integers appear 2 time(s)

#include using namespace std;

int main() { int inputValue; int countOfNegativeFifteen;

/* Your code goes here */

cout

return 0; }

image text in transcribed

445580.2370224.93zqy7 Jump to level 1 Use cin to read integers from input until 999 is read. For each remaining integer read before 999 , if the integer is equal to - 15 , output "-15 appears" followed by a newline and increment countOfNegativeFifteen. Ex: If the input is 15191515 999, then the output is: 15 appears 15 appears 15 appears 3 time(s) 2

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899