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
Are self driving cars essential for the future of transportation
azamat
Yes, I think so at least because what about those who can't physically drive? They would want the experience of being in the driver's seat.
6 0
3 years ago
1.1 Why is primary goal of software development now shifting from
lidiya [134]

is where the term ‘App’ comes from. It is any piece of software that allows us to actually ‘use’ the computer. For example, it may be a word processor, web browser, spreadsheet software or even just a game. Application software relates to the user rather than the hardware

5 0
3 years ago
Sql is an example of a ________ category programming language. 4gl 3gl 5gl 2gl
kicyunya [14]
The answer is Fourth-generation language (4GL).  <span>Sql is an example of a 4GL category programming language.  </span>SQL<span> is considered a Fourth-generation </span>language<span> (</span>4GL), whereas Java and C++ are third-generation languages<span> (3GLs). Fourth-generation </span>languages<span> are programming  </span>languages<span> that are closer to human </span>language<span> than the high-level </span>languages<span>  like Java.</span>
8 0
3 years ago
A product/process is referred to as a Key Technology during which of the following phases of the technology development cycle?
Galina-37 [17]
The answer is C. Mature phase.
3 0
3 years ago
Read 2 more answers
Ark titanoboa taming
ivann1987 [24]
Huh???????................
3 0
3 years ago
Other questions:
  • Vpns create a _____________ to transport information through public communications media.
    8·1 answer
  • A book of the Law was found in the Temple, which was being repaired, during what year of Josiah's reign.
    15·2 answers
  • What is the name of a popular high-level computer programming and scripting language that is the name of a snake?
    10·1 answer
  • When changing the formatting of a spreadsheet to make it more readable, you should use light blue text on a bright blue backgrou
    12·1 answer
  • An organization is assigned a Class-C network 200.120.80.0 and wants to form subnets for its threedepartments: D1 (60hosts), D2
    7·1 answer
  • Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program where the
    6·1 answer
  • HELP asap please... ​
    13·1 answer
  • Supp guees how your dayyyyyyyyyyyy
    10·2 answers
  • What term is used to refer to the requesting of information from a database?
    10·2 answers
  • Which of these statements correctly describe aspects of testing code? Check all of the boxes that apply.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!