Professional Documents
Culture Documents
Exercise 2
Write a C++ program that outputs on the screen the following patterns:
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
********************************************************************************
Exercise 3
Write a C++ program that computes the sum of the different grades (Labs, Midterms, Final)
obtained in the CS140 course for a given student. The program should ask the user to enter the
grade for each evaluation. You should stick to the following output.
Lab 1 (0 - 10): 6
Lab 2 (0 - 10): 7.5
Midterm 1 (0 - 20): 16.5
Midterm 2 (0 - 20): 18.5
Final (0 - 40) : 26.5
Sum = 75
Exercise 4
Write a C++ program determines whether a number n given by the user is even or odd.
Exercise 5
Write a C++ program determines whether a number n given by the user is a multiple of 3 or not.
Exercise 6
Write a C++ program that determines the maximum of 3 numbers a, b, and c given by the user.