Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE PAY ATTENTION TO THE TEST CASE PROVIDED the end result MUST look exactly like the test case shown, same spacing, same alignment, same numbers,

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribedimage text in transcribed

image text in transcribedimage text in transcribed

PLEASE PAY ATTENTION TO THE TEST CASE PROVIDED the end result MUST look exactly like the test case shown, same spacing, same alignment, same numbers, etc. Thank you in advance! Here is the problem given: Open evenOddDo While.cpp and edit this program so that the program will reject bad answers (anything other than Y, y, N or n). Your program should allow the user to answer with Y and N (uppercase) as well as y and n (lowercase) To reject bad answers, use the do while loop. You are asking the user to enter her answer (Y, y N, or n) in 2 different places. You need to use the do while loop around each of them. Below is the program we are meant to edit: #include #include using namespace std; int main() int num; int odd int even 0; int sum0; int count double avg char ch; cout > num; sum sum+num ; count +t i f (num%2-0) cout >ch; if (count-0) cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions