Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This exercise demonstrates how to use nested IF-ELSE IF statement for Pattern 5 - Remove all code added between the /I Your lab exercise ...

image text in transcribed
image text in transcribed
image text in transcribed
This exercise demonstrates how to use nested IF-ELSE IF statement for Pattern 5 - Remove all code added between the /I Your lab exercise ... comment lines - Copylpaste the following between the comment lines int lntA=2, Int; char Char; string Str; if (IntA==1){ cout "The value of lntA is 1ln "; \} else if (lntA=2){ cout "The value of IntA is 2ln; \} else \{ \} cout "The value of IntA is not 1 or 2ln"; cout "lnEnter a number: "; cin Int; II ADD A SECOND IF-ELSE IF STATEMENT USING PATTERN 5 HERE cout "InEnter a letter: "; cin Char; II ADD A THIRD IF-ELSE IF STATEMENT USING PATTERN 5 HERE getline(cin, Str); cout "InEnter a state: "; getline(cin, Str); II ADD A FOURTH IF-ELSE IF STATEMENT USING PATTERN 5 HERE - Add a second IF-ELSE IF statement that shows the following messages depending upon the value of Int1 The number is 1 The number is 3 The number is 5 The number is not recognized - Add a third IF-ELSE IF statement that shows the following messages depending upon the value of Int1. See Comparisons.pptx slide "Character Compaison examples" The letter is A The letter is B The letter is C The letter is not recognized - Add a fourth IF-ELSE IF statement that shows the following messages depending upon the value of Int1 NOTE: Use the compare function. See Comparisons.pptx slide "compare format examples" The state is Pennsylvannia The state is Delaware The state is New Jersey The state is not recognized Here is an example Result pane My name is John Doe The date is 10-2e-2e22 1e:22 The value of IntA is 2 Enter a number: 3 The number is. 3 Enter a letter: A The letter is A Enter a state: Nesu Jersey The state 1s New Jersey

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions