Write a Program in C That Using The do...while Repetition Statement

// Using the do...while repetition statement
#include <stdio.h>

// function main begins program execution
int main( void )
{
   unsigned int counter = 1; // initialize counter
   
   do {                                               
      printf( "%u  ", counter ); // display counter    
   } while ( ++counter <= 10 ); // end do...while   
} // end function main

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...