Translate

Bu Blogda Ara

6 Mart 2018 Salı

Introduction for do while Statement

#include<stdio.h>
int main(){

 int counter=1;


 /*
Regardless of condition of while,first of all  the program execute the printf function inside the do and it will not repeat it again.It will continue with while and when while condition does not suitable for that specific condition while will end.*/
 do{
  printf("%d\n",counter);
  }
  while(++counter<=1);
/*In the beginning the value of counter is 1 and It print the it.After that by statement ++counter we increment the value of counter by 1.*/




 return 0;
}

Hiç yorum yok:

Yorum Gönder