Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How do i make a loop? In c?

–1 vote
asked Nov 26, 2020 by Superman365 (500 points)
How to make a loop? Can we make easy loops? Can we also learn it properly, without any mistakes everytime?

indecision

2 Answers

0 votes
answered Nov 26, 2020 by Peter Minarik (22,520 points)

Making mistakes are part of learning. So don't be afraid of them.

As for various C loops, there are plenty of tutorial online.

You can check out this one for instance.

Good luck!

0 votes
answered Nov 29, 2020 by kshitij gupta (140 points)
for example we make program which is print 1 to 10 digits

for(int i=1;i<=10;i++)          #here i=1 then loop check condition 1 is less than to 10 or not if condition is true then                                             # the statenment  inside of loop will run then i implement to 1 i++ means i=i+1 it                                                      # means now the value of i is 2 and again condition statement run the i implemen so                                           on loop will run till when condition be false.                                            

{   printf("%d\n",i);

}

return 0;
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...