(C PROGRAMMING ONLY) 2. Pairing Up by CodeChum Admin You’re tasked with pairing up people with each other but you need to figure out how well both of them work together. In order to find out how effective each pair is, you need to create a program that adds both of their values and returns their sum. Instructions: In the code editor, you are provided with a main() function that asks the user for two integer inputs, passes these to a function called, getSum(), and then prints the returned value. Your task is to declare and define the getSum() function which has the following details: Return type - int Name - getSum Parameters - 2 integers Description - adds the passed integers and returns their sum DO NOT EDIT ANYTHING IN THE MAIN Input 1. First integer 2. Second integer Output Enter first number: 24 Enter second number: 21 Sum = 45
(C
2. Pairing Up
by CodeChum Admin
You’re tasked with pairing up people with each other but you need to figure out how well both of them work together. In order to find out how effective each pair is, you need to create a program that adds both of their values and returns their sum.
Instructions:
In the code editor, you are provided with a main() function that asks the user for two integer inputs, passes these to a function called, getSum(), and then prints the returned value.
Your task is to declare and define the getSum() function which has the following details:
Return type - int
Name - getSum
Parameters - 2 integers
Description - adds the passed integers and returns their sum
DO NOT EDIT ANYTHING IN THE MAIN
Input
1. First integer
2. Second integer
Output
Enter first number: 24
Enter second number: 21
Sum = 45
Step by step
Solved in 4 steps with 2 images