#include<stdio.h>
      int main()
      {
          printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
          /* 
              always declare the variables before using them 
          */
          int i = 10;     // declaration and initialization at the same time
          do // do contains the actual code and the updation
          {
              printf("i = %d\n",i);
              i = i-1;    // updation
          }
          // while loop doesn't contain any code but just the condition
          while(i > 0);
          printf("\n\The value of i after exiting the loop is %d\n\n", i);
          printf("\n\n\t\t\tCoding is Fun !\n\n\n");
          return 0;
      }
      
      C language logo

      Basic DO WHILE

      0

      0

      avatar
      natalie19970

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.