Professional Documents
Culture Documents
Dania CSC (Lab 5)
Dania CSC (Lab 5)
Task 2: Suppose that x, y, and z are int variables, and x = 10, y = 15, and z = 20. Determine
whether the following expressions evaluate to true or false.
Task 8: Write a program that reads an integer and determines and prints whether it is odd or
even. (Hint: use modulus operator)
Task 11: Write a pseudocode and a complete C++ program that prompts the user to enter the
reading of API. The program is able to check the air quality based the API table and prints an
appropriate message to the user.
Task 12: Write a complete C++ program for the following problem statement using suitable
control structure.
Calculate and display the new price (after discount deduction) of a car using the following
table
Task 13: Write a C++ program for a simple calculator using switch selection structure. Your
program should be able to read two numbers from user. (+, -, *, /)