Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part#1 Evaluate each of the following logical expressions, giving that: int a = 10, b = 3, c = 2; Expression True False a +
Part#1
Evaluate each of the following logical expressions, giving that:
int a = 10, b = 3, c = 2;
Expression | True | False |
a + 3 * b / 2 > 13 |
|
|
0 == b + b % 2 |
|
|
!(a == b+12) && (4 == c) |
|
|
!( q >= p - r || q < p - r) |
|
|
b % a != 3 |
|
|
Part#2
- Write a C++ program to read from the user an integer number of 4 digits and display it in reverse order. For example, if the input is 5723 the output should be 3275. (Hint use / and %). The program should display Invalid input if the input value is not a 4 digits number.
- Write a C++ program to read from the user three integer values. The program should display the three values in ascending order. (Do not use arrays). For example:
if the three input values are: 56 30 45
the output should be: 30 45 56
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started