/*do while loop executes atleast once*/ int main(){ int num, index=0; printf("enter a number \n"); scanf("%d",&num); do{ printf("%d \n",index); index+=1; } while (index<num); return 0; }
/*do while loop executes atleast once*/ int main(){ int num, index=0; printf("enter a number \n"); scanf("%d",&num); do{ printf("%d \n",index); index+=1; } while (index<num); return 0; }