do while loop

PHOTO EMBED

Tue Oct 26 2021 05:32:26 GMT+0000 (Coordinated Universal Time)

Saved by @codewitharchi

#include <stdio.h>
int main()
{
    int num, index = 0;
    printf("Enter a number\n");
    scanf("%d", &num);
    do
    {
        printf("%d\n", index);
        index = index + 1;
    } while (index < num);
    return 0;
}
content_copyCOPY