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
A written guarantee to fix or replace an item is called a _____.
VladimirAG [237]
A warranty is a statement given by the manufacturer or other company
3 0
3 years ago
Read 2 more answers
Cybersecurity breaches in the workplace generally happen because _____. Select 3 options. people deliberately try to hack into t
Lady_Fox [76]

Cybersecurity breaches in the workplace generally happen because:

  • People deliberately try to hack into the network people.
  • People make unintentional mistakes.
  • People do not know about cybersecurity protocols

<h3>What are the three main causes of security breaches?</h3>

The major reasons for data breaches are:

  • Old, Unpatched Security Vulnerabilities.
  • Human Error
  • Malware, etc.

Therefore, Cybersecurity breaches in the workplace generally happen because:

  • People deliberately try to hack into the network people.
  • People make unintentional mistakes.
  • People do not know about cybersecurity protocols

Learn more about Cybersecurity from

brainly.com/question/12010892

#SPJ1

5 0
2 years ago
True or false
Semmy [17]
It’s false I hope this helped you
3 0
3 years ago
I need help with the code practice 9.2 Edhesive.<br><br> Thank you
antiseptic1488 [7]

Answer:

you talking about anaconda navigation? i would love to help!

Explanation:

3 0
3 years ago
Read 2 more answers
Drag the tiles to the correct boxes to complete the pairs. Match the conversion systems with their steps. To convert a decimal f
bixtya [17]

Answer:

1

Explanation:

8 0
3 years ago
Other questions:
  • What do work places allow a company to do
    12·1 answer
  • What is ment by creative middle way solution
    6·1 answer
  • Whenever I ask a question I loose points I just asked a question before and I had 56 points now I have 12 now I'll probably have
    14·1 answer
  • I need help with some computer stuff
    8·1 answer
  • After clicking the Start button on your computer screen desktop, what option would you then select to examine system components
    5·1 answer
  • What is the smallest unit of data on the hard drive?
    5·1 answer
  • A band wants to know what their most popular CD is so that they can have more copies made to sell. Which statistical measurement
    11·2 answers
  • If there is a circuit that is being used 36 CCS then how much of that circuit is being used in Erlang?
    8·1 answer
  • What is an compiler?
    15·2 answers
  • Here is the model I’m working on and can’t figure it out this model shows the basic process of making a protein what are the str
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!