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