Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

5. If yes, then why?

Answered: 1 week ago

Question

3. What changes should I be making?

Answered: 1 week ago