Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given a int variable named yesCount and another int variable named noCount and a

ID: 3645537 • Letter: G

Question

Given a int variable named yesCount and another int variable named noCount and a char variable named response , write the necessary code to read a value into 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.

Explanation / Answer

#include using namespace std; int main() { int yesCount,noCount; char response; cin>>response; if(response==Y||response==y) { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote