Question: 1. Create a C++ function that takes two numbers as arguments and return their sum. Examples addition(3, 2) 5 addition(-3, -6) -9 addition(7, 3) 10

1. Create a C++ function that takes two numbers as arguments and return their sum.

Examples

addition(3, 2) 5

addition(-3, -6) -9

addition(7, 3) 10

__________________________________________________

2. Write a C++ function that takes two integers (hours, minutes), converts them to seconds, and adds them.

Examples

convert(1, 3) 3780

convert(2, 0) 7200

convert(0, 0) 0

______________________________________________

3. Create a C++ function that takes a number as an argument and returns "even" for even numbers and "odd" for odd numbers.

Examples

isEvenOrOdd(3) "odd"

isEvenOrOdd(146) "even"

isEvenOrOdd(19) "odd"

4. Using a function, write a C++ program to calculate compound Interest. The formula is A = P (1 + r/n) (nt)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!