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

Name: 1. Evaluate the truth value of the following expression, Show your work 10

ID: 3870209 • Letter: N

Question

Name: 1. Evaluate the truth value of the following expression, Show your work 10% 83)&&5/2 1-2.5 Two football teams, C and F, play against each other and have their final scores saved in variables scoreC and scoref, respectively. Write the code segment that compares these two score totals and prints a message stating won the game, F won the game, or whether the game was tied. 2. 3. Write a valid C statement to check if a user's input value is in the range of 70 and 80, inclusive. Display a message stating if it is range or not.

Explanation / Answer

1. 10 % 8 < 2 || !(24/8 > 3) && 5/2 !=2.5

step - 1: 10 % 8 < 2 --> F (2 < 2 false)

step - 2: !(24/8 > 3) --> T (3>3 F and !F = T)

step - 3: (5/2 != 2.5) --> T ( 2! = 2.5)

F || T && T = T && T = T

2. if(scoreC > scoreF)

printf("C won the game");

else if(scoreC < scoreF)

printf("F won the game");

else

  printf("Game Drawn");

3. if (input >= 70 && input <=80)

printf("input is range of 70 and 80");

else

printf("input not in range of 70 and 80");

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote