C examples for Statement:do while
Do-while loop that counts backward.
#include <stdio.h> int main()//from w ww. j a v a 2 s .co m { int start; printf("Please enter the number to start\n"); printf("the countdown (1 to 100):"); scanf("%d",&start); /* The countdown loop */ do { printf("T-minus %d\n",start); start--; } while(start>0); return(0); }