// why do we make a program and do all those coding stuff?
// simply by programming & coding we want to instruct your machine
to perform the task we want to be performed.
// loops are like a superior weapon for programmers to
make their programs more efficient and convenient.
//If a programmer wants to write a specific code for n times
(more than one time) with traditional methods,
// he has to face a lot of hustle to create an efficient program.
//At this point loop helps a programmer a lot by doing all that
repetition stuff.
// types of loops:_ 1. do while loop 2. while loop 3. for loop
//
// project:_1 (counting)
#include <stdio.h>
int main()
{
int num;
printf("enter the number where you want to start counting:\n");
scanf("%d", &num);
printf("counting from %d is as follows:\n", num);
for (int i = 0; i < 10; i++)
{
printf("%d\n", num + i);
}
return 0;
}
No comments:
Post a Comment
here we are to help you.you can watch videos and get information about :- (1) scientific facts (2) education (3) gaming (4) music (5) lyrics (6) cartoons and many more.So keep watching keep learning, thank you.