/*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;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter