Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Students also viewed these Databases questions

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago