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
1. Create a function called count_to_three() , remember the colon.
Len [333]

Answer:

This program is written using Python programming language

The program doesn't make use of comments

See attachment for proper format of the program

def count_to_three():

print("One")

print("Two")

print("Three")

count_to_three()

Explanation:

The first line of the program defines the function count_to_three() with no parameters, passed to it

Line 2 to 4 of the program is indent and each line make use of print() function

Line 2 prints "One", Line 3 prints "Two" and Line 4 prints "Three" without quotes

The last line of the program calls the defined function

4 0
3 years ago
Next
umka21 [38]

Answer:

script=java

makeup=Html

css=text

dom=document

Explanation:

3 0
2 years ago
When talking about careers in designing game art, the unit mentioned that a good portfolio and a clear record of experience in g
atroni [7]

Answer:

Explanation:

Many different answerd to this

I dont know what course your taking exactly but i'll do my best <3

Personnally im most interested in balancing in game rewards, balancing AI, or balancing in game currency.

Hmm... I dont really kno what you could add to your portfolio tho. Maybe some things you did that involve what youre interested in doing.

Hope this helps <3

8 0
3 years ago
Consider the method total below.
evablogger [386]
That code, if it even compiles, won't produce those values with that call.
5 0
3 years ago
Read 2 more answers
Annabella was giving a presentation to a group of 20 real estate agents on
podryga [215]

Anticipate questions.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Why would Google combining information from separate accounts across its services and sites have privacy implications for its us
    11·1 answer
  • Keyshia adds shapes with text to show the steps involved in taking the temperature of a liquid in a laboratory. She
    6·1 answer
  • Computer ForensicsThere are many differences between public-sector and private-sector computer investigations. What do you see a
    7·1 answer
  • How did the movie characterized being a genius on real genius movie
    13·2 answers
  • How is an orthographic drawing similar or different from an isometric drawing
    12·1 answer
  • You work in the educational software industry. Your boss asks you to give a brief lecture to other employees about the digital d
    7·2 answers
  • Write a program segment with a do-while loop that displays whether a user-entered integer is even or odd. The code should then a
    5·1 answer
  • Suppose you will invest $100 per month at the beginning of the month for 40 years with interest rate
    5·1 answer
  • In excel what happens when rename a sheet from sheet1 to inventory​
    7·1 answer
  • I'd: 9872093250, password: qqqqq, join the meeting​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!