n the code editor, you can see that there is a main() code which asks the user 3 inputs, calls the sumThing() function, and then prints the result. Do not touch/modify the code in the main().
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
3. Sumthing Sumthing Sumthing (C
by CodeChum Admin
Now that our communication with Lionel is okay, I can now ask him my request.
There's something I want to know. I want to know the sum of things so that I can say that I know something.
Huh! That's a bit confusing. Can you help me define it clearly?
Instructions:
In the code editor, you can see that there is a main() code which asks the user 3 inputs, calls the sumThing() function, and then prints the result.
Do not touch/modify the code in the main().
All you have to do is to declare and define the sumThing() function with the following details:
Return Type - int
Name - sumThing
Parameters - 3 integers
Input
1. First integer
2. Second integer
3. Third integer
Output
Enter integer 1: 10
Enter integer 2: 20
Enter integer 3: 30
60
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images