Posts

Showing posts from October, 2016

Decision Making and Looping in C

Image
In this post we are going to discuss the basics of loops. This loops are very helpful for Programming languages Not only C but all of them. To execute a segment of a program up to given terminating condition repeatedly is called looping in a programming language. for e.g. adding numbers from 1 to 10                     int i=0,sum=0;                      while(i<=10)                                     {                                      sum=sum+i;                                       i++;                                       } The above program adds the numbers 1 to 10, but here using a loop each and every time it enters the loop with an incremented value of 'i' and checks the condition weather it is satisfied or not. We will discus the functioning of while loop later in this post.