Section C Practical Instructions: Use Codeblocks/www.onlinegdb.com to write programs. Copy and paste the program in the answer part Write a program that accepts 10 integers form the user and then displays the sum of numbers which are less than 5 and the sum of numbers which are greater than 10 using loops. Sample Output: Enter a number 113 Enter a number 2 Enter a number Enter a number 4 Enter a number 5 Enter a number 6:3 Enter a number 7 : 1 Enter a number 8: 5 Enter a number 918 Enter a number 10 11 Sum of numbers less than 5 is 11 Sun of numbers greater than 10 is 11
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.
C code
Screenshot and output is must
Step by step
Solved in 4 steps with 2 images