Using While loop example || loop example || C programming examples

While loop example

#include <stdio.h>
 
main()
{
   int value = 1;
 
   while(value<=3)
   {
      printf("Value is %d\n", value);
      value++;
   }
 
   return 0;
}

Output:
Value is 1
Value is 2
Value is 3
Share this Post Share to Facebook Share to Twitter Email This Pin This Share on Google Plus Share on Tumblr join on whatsapp

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment