Mega Code Archive

 
Categories / C / Code Snippets
 

Use int as the while loop controller

#include <stdio.h> main() { int j,n; scanf("%d",&n); j = 0; do { printf("the numbers are %d \n",j); j = j +1; }while( j<n); }