Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1). Construct logical expressions to represent the following conditions: (A). we

ID: 3683168 • Letter: 1

Question

1). Construct logical expressions to represent the following conditions: (A). weight is greater than or equal to 115 but less than 125.(B). ch is q or Q. (C).x is even but is not 26.(D). x is even but is not a multiple of 26.(E). donation is in the range 1,000–2,000 or guest is 1.

2). What is the variable type for each of the following declarations?

auto cars = 15;

auto iou = 150.37f;

auto level = 'B';

auto crat = U'/U00002155';

auto fract = 8.25f/2.5;

3). Declare variables matching the following descriptions:

A short integer with the value 80

An unsigned int integer with the value 42,110

An integer with the value 3,000,000,000

Explanation / Answer

1)

A) if (weight >=155 && weight<125)

B) if (ch =='q' | | ch=='Q')

C) if (x % 2 == 0 && x != 26)

D) if (x % 2 == 0 && x % 26 != 0)

E) if ((donation >=1000 && donation <=2000) ||guest==1)

2)

auto cars = 15;      int

auto iou = 150.37f;   float

auto level = 'B';    char

auto crat = U'/U00002155';

auto fract = 8.25f/2.5;   double

3)

short a = 80;           
unsigned int b= 42110;   
unsigned long c = 3000000000;