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
What appears in the document after you have inserted a video?
Nitella [24]

Answer:

text with a hyperlink to the video website

Explanation:

documents do not auto-upload thumbnails or embedded videos for playback, so external links are pasted there

6 0
3 years ago
Read 2 more answers
Participants in open _________ community projects get experience and make connections with other professionals that can be valua
aleksandrvk [35]

Participants in open source community projects get experience and make connections with other professionals that can be valuable resources during a job hunt.

8 0
3 years ago
What is the configuration of a multimedia computer​
sertanlavr [38]

Answer:

) In computers and computer networks, a configuration often refers to the specific hardware and software details in terms of devices attached, capacity or capability, and exactly what the system is made up of.

Explanation:

hope it helps

3 0
3 years ago
HAve a good week lads, good luck on work :D
Leno4ka [110]

Answer:

v; its alright.

Explanation: none v;

8 0
3 years ago
Read 2 more answers
What is 1gb in bits?​
Irina-Kira [14]

Answer:

8e+9

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • A very simple device that connects network components and sends packets of data to all other connected devices is called a _____
    5·1 answer
  • What was the ENIAC computer and how was it used/what for?
    9·1 answer
  • Banking Account
    9·1 answer
  • A user reports that he cleared a paper jam and now cannot print. The technician reseats the paper and then prints a test page fr
    14·1 answer
  • Anyone know how to delete that I need ASAP
    13·1 answer
  • If I write too much for an exam answer, do I get downgraded?
    7·1 answer
  • When you sign in to your Microsoft account with another Windows device, your settings will appear very differently than they do
    7·1 answer
  • Does anyone know 7.1.3: Firework karel?
    5·1 answer
  • When assigning a value to a string, which of the following rules needs to be followed?
    8·1 answer
  • Which of the following is opened when the Find command is clicked? Question 9 options: Navigation Pane Insert Hyperlink dialog b
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!