Question: Exercise2: Write a complete C++ program that gets a number from user and checks if the number is odd number or even number by using
Exercise2: Write a complete C++ program that gets a number from user and checks if the number is odd number or even number by using the following user defined function. Then, if the number is even, then display a message as "The given number is even". Otherwise, display message as "The given number is odd". Function 1: int isEven(int number); Exercise3: Write a complete C++ program that gets two numbers and an operand (+,,,/) from the user, calculate and display the results to the user by using the following user defined functions. (Hint: The Function2 should be called inside of Function1). Function 1: void getNumber(); Function2: double calculate(int num1, int num2, char operand); Exercise4: Write a complete C++ program that gets quiz, midterm and final marks from the user. Then, calculate the average and display the result to user by using the following user defined functions. (Quiz: 20\%, Midterm: 30\%, Final: 50% ) Function 1: double quizPercentage(int quiz); Function2: double midtermPercentage(int midterm); Function3: double finalPercentage(int final); Function4: void calcAverage(double quiz, double midterm, double final)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
