Starting from:

$29

Lab 02 - Streaming, Expressions & Variables

Lab 02 - Streaming, Expressions & Variables
Direction: Submit typed work in the Labs directory of your github repository and/or as an attachment on Google classroom
under the accurate Lab02 assessment. All submissions should have their appropiate extensions.
Part A: In class
Your objective is to write a complete C++ program. For each of the following English statements
 Two integers are positive consecutive odd numbers.
 The character is a lowercase vowel.
write code that
a. declares a variable for each of the unknown values in the statement. Make sure to use acceptable data types.
b. prompts the user to provide a value(s) for the variable(s), and then, store the input(s) in the variable(s).
Have a separate prompt for each variable.
c. assigns a bool variable a bool expression that represents the English statement using the variable(s) as the
unknown(s).
d. displays the value of the bool variable preceded by the string ''Result: ''. The string and bool value must
be on its own line.
Part B: Take home
Your objective is to write to write a complete C++ that
a. Prompt the user and store their inputs in acceptable variables for
 a name (it may contain a space)
 an adjective
 a noun (may contain spaces)
 a pronoun
 a part of the body (may contain spaces)
 a positive number
b. Display the message below in the exact format
Please excuse name,
who is far too adjective to attend noun class. Furthermore, pronoun is sick
with the part-of-the-body flu. It will take positive-number days for name to recover.
where name, adjective, noun, pronoun, part-of-the-body, and positive-number are the values of their respective
variables from the previous step.
c. After the body of the main function, write a trace table list of the main function with the inputs
(''Alex Jane'',''anxious'',''chemistry'',''she'',''eye'',12)
as a comment

More products