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]
2 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]2 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
Please find one organization that has recently adopted virtualization and summarize their reasons for taking this approach. What
Mamont248 [21]

Answer:

Harley-Davidson Motor Company

Explanation:

Harley-Davidson produces and sells custom-made, touring as well as cruiser motorcycles that feature elegant styling,  modern innovative design, and high quality performance with the ability to customize to ones taste.  Harley-Davidson moved 95% of their x86 server workloads to virtualized environments utilizing VMware infrastructures as of 2018. They report to have being able to have higher system availability, effective and simple disaster recovery capabilities, improved operation efficiencies, and cloud-ready infrastructure. One of the major challenges of virtualization is Security, Virtual systems can easily get compromised.

8 0
2 years ago
What is the correct name for the words Home, Insert, Design, Layout, References, etc. in the ribbon in Word 2016?
larisa86 [58]

Answer:

tabs

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

The commands which are used in Microsoft Word 2016 are displayed using series of icons that are stored on different tabs.

A ribbon is a combination of icons and tabs. In Microsoft Word 2016, the correct name for the words Home, Insert, Design, Layout, References, View, Mailings, and Review in the ribbon is tabs.

Tabs are a section of the Microsoft Word application that avails end users the opportunity to perform certain tasks such as formatting a text, changing the layout, clipboard, paragraph, styles, tables, page setup, inserting a theme, applying color, editing and inputting footnotes, header, citation and bibliography, etc.

8 0
3 years ago
Atheel tests a program and gets a NameError. How can this be fixed?
Oksana_A [137]

Answer:

You can't call a function unless you've already defined it. Move the def createDirs(): block up to the top of your file, below the imports.

Explanation:

Some languages allow you to use functions before defining them. For example, javascript calls this "hoisting". But Python is not one of those languages.

7 0
3 years ago
Read 2 more answers
Select all the correct answers. Which two statements are true about an OS? translates the user's instructions into binary to get
lubasha [3.4K]

Answer:

all

Explanation:

4 0
3 years ago
Someone who wants to learn a skilled trade on the job should consider
Alexeev081 [22]
Someone who wants to learn a skilled trade on the job should consider enrolling in class for the knowledge and skills.
5 0
3 years ago
Read 2 more answers
Other questions:
  • To add text to a blank slide layout, _____.
    8·2 answers
  • Which device can be installed on the edge of your network to allow multiple remote users to connect securely to your internal en
    9·1 answer
  • If you were setting up a network with 100 nodes and you wanted no more than 25 nodes per segment: what devices and connections w
    9·1 answer
  • What should you do to organize a large amount of data??
    10·1 answer
  • What is the output of the following program?
    11·1 answer
  • What is malware? a type of virus that spreads through a network connection a type of virus that targets programs and files any p
    12·1 answer
  • Why the internet is not considered a mass medium in Africa​
    13·2 answers
  • Which of the following statements is FALSE?
    5·1 answer
  • 11.6 Code Practice edhesive
    11·1 answer
  • Consider the following static method.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!