1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
KengaRu [80]
3 years ago
9

Given a int variable named yesCount and another int variable named noCount and a char variable named response, write the necessa

ry code to read a value into response and then carry out the following: if the character typed in is a y or a Y then increment yesCount and print out "YES WAS RECORDED" if the character typed in is an n or an N then increment noCount and print out "NO WAS RECORDED" If the input is invalid just print the message "INVALID" and do nothing else.
Computers and Technology
1 answer:
MariettaO [177]3 years ago
5 0

// reading the value in response variable

cout<<"Enter the value :";

cin>>response;

// checking the value and printing the results

if(response == 'y' || response == 'Y')

{

yesCount+=1;

cout<<"YES WAS RECORDED";

}else if(response == 'n' || response == 'N')

{

noCount+=1;

cout<<"NO WAS RECORDED";

}else

cout<<INVALID";

You might be interested in
Which spreadsheet toolbar displays options such as Cut and Paste?
Lilit [14]
The answer would be ''Drawing Toolbar'' and you can find this inside your mouse area, where u click the right button (right side) and it shows a small chart/toolbar where it gives you the options to copy, cut, paste and more.
6 0
3 years ago
Read 2 more answers
All of the following statements about logistics information systems (LIS) are true except ________.
MissTica

Answer:

The answer is C

Explanation:

5 0
3 years ago
* Describe the five components of a<br> computer
LenaWriter [7]

Answer:

Computer systems consist of three components as shown in below image: Central Processing Unit, Input devices and Output devices. Input devices provide data input to processor, which processes data and generates useful information that's displayed to the user through output devices. This is stored in computer's memory.

5 0
2 years ago
Read 2 more answers
When you receive five job offers what does it mean
7nadin3 [17]

that you are a great canidate, in high demand, and well trained!

6 0
3 years ago
Which is the base class in the following statement? class car : public vehicle
tatiyna

The base class in the following statements is the vehicle class.

<h3>What is a base class?</h3>

A base class is also known as a parent class.

A parent class is the existing class from which the other classes are determined and properties are inherited.

The class car is the child class. The child class inherit the properties of the parent class or the base class.

Therefore, the base class is the vehicle class.

learn more on class here; brainly.com/question/14293976

#SPJ11

8 0
2 years ago
Other questions:
  • A dedicated website was created where fans could post photos of the pages from decoded that they found. in the communication pro
    11·2 answers
  • Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "
    6·1 answer
  • Write a function that creates a one-dimensional game board composed of agents of two different types (0 and 1, X and O, stars an
    11·1 answer
  • What is different between attaching a file on an email program versus a smartphone?
    12·2 answers
  • Select the correct answer.
    10·2 answers
  • Nielsen purchases scanner data from retail transactions to track the sales of consumer packaged goods, gathered at the point of
    14·1 answer
  • What is ABC computer?​
    14·1 answer
  • Visual Design includes 4 elements: shapes, texture, lines and form.
    6·1 answer
  • Define computer memory and write its type <br>​
    10·2 answers
  • Plz help
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!