int sum = 0;
int number;
for (int i=0; i<10; i++) {
printf("Enter an integer number: ");
scanf_s("%d", &number);
sum += number;
}
printf("The sum is %d", sum);
Answer:
loop
Explanation:
Loop is the one which is used to execute the specific statement again and again until the condition is true.
In the programming, there are 3 basic loop used.
1. for loop
<u>Syntax:</u>
for(initialization, condition, increment/decrement)
{
statement;
}
the above statement execute until the condition in the for loop true when it goes to false, the loop will terminate.
2. while loop
<u>Syntax:</u>
initialization;
while(condition)
{
statement;
increment/decrement;
}
it is work same as for loop and the increment/decrement can be write after or before the statement.
3. do while
syntax:
initialization;
do
{
statement;
increment/decrement;
}while(condition);
here, the statement execute first then, it check the condition is true or not.
so, if the condition is false it execute the statement one time. this is different with other loops.
Explanation:
ICT permeates all aspects of life, providing newer, better, and quicker ways for people to interact, network, seek help, gain access to information, and learn. Besides its presence everywhere, Information and Communication Technology has an immense economic significance.
by typing ctrl+ s on keyboard