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 of the following transferable skills are generally the most looked for in the IT field?
san4es73 [151]
The correct option is D.
Transferable skills refers to those set of skills that do not belong to any specific field or industry, they are general skills and can be transferred from one job to another. Option D is the correct choice because all jobs require the employees to have problem solving skill, team building skills and communication skills; all these skills contribute to a successful career. 
3 0
3 years ago
Read 2 more answers
Select the correct answer.
galben [10]

Answer:

the RAM if i am not mistaking

8 0
3 years ago
What new england industry quickly collapsed with the discovery of oil in pennsylvania
Elena-2011 [213]

It was the whaling industry.  Whaling use to be the main source of oil that was used for fuel and lighting in America which was based in the coastal communities of New England.  It went into decline when oil was discovered in 1859.  Eventually it replaced whale oil as a source of fuel and life.

6 0
3 years ago
Read 2 more answers
Tyra used the software development life cycle to create a new game. After debugging and documenting code, she released it to her
REY [17]

Answer:

Maintenance

Explanation:

Maintenance

This primarily involves updating and making improvements based on user feedback, as well as resolving any defects that arise.

6 0
3 years ago
Questions: What memory modules are needed if the customer wants 3 GB of RAM? What capacities and how many modules of each capaci
zhannawk [14.2K]

Answer:

You could use three 1 GB modules.

4 0
2 years ago
Other questions:
  • To what device, inside the computer, do all other devices connect
    10·2 answers
  • You have been contracted by a local school to evaluate their computer labs for security threats. They are most worried about the
    6·1 answer
  • When studying an information system, illustrations of actual documents should be collected using a process called _____.
    12·1 answer
  • Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds.
    8·1 answer
  • You work in a classified environment where Bell LaPadula MLS (Multilevel Security) model is employed. Your clearance is "SECRET"
    5·1 answer
  • When dealing with a person who is behaving violently you should argue with them. A. False B. True
    5·1 answer
  • _____ can render data useless to unauthorized users who might have violated some of the database security layers.
    7·1 answer
  • The operating cost of driving include
    11·1 answer
  • In 3 to 5 sentences, describe whether or not files should be deleted from your computer. Explain you answer.
    14·2 answers
  • B. What significant values have you learned while learning the tools and utensils?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!