Create a void function that takes as parameters two


Question 1: Create the subsequent C++ functions and 'call' them each from main():

Part 1: Create a void function that takes as parameters two integers, adds them, and prints them out to the command line.

Part 2: Create a function that takes as parameters two doubles, adds them, and returns the result to the function that called it. Output the result from main().

Part 3: Create a function that returns the magic number 12 every time it is called. It has no parameters. Call it from main and output the magic number.

Part 4: Create a function that takes as a parameter a string name, and prints out that name to the command line. Call your function from main.

Solve these questions in details and provide examples to support your rationale.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Create a void function that takes as parameters two
Reference No:- TGS0958422

Expected delivery within 24 Hours