Answered step by step
Verified Expert Solution
Link Copied!

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

  1. 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.

  1. 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

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

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

how do you find the values values of p and p ?

Answered: 1 week ago