To print the integers from 0 to the user input, the program use loops. Additionally, the indented space before each iteration value is printed using loops.
This is the C program that uses comments to explain each line:
#include <stdio.h>
int main(){
//This declares userNum as integer
int userNum;
//This gets input for userNum from the user
scanf("%d",&userNum);
//This iterates through from 0 to userNum
for (int i = 0; i <= userNum; i++ ) {
//This iterates from 0 to current iteration value
for (int j = 0; j < i; j++ ) {
//This prints the indents
printf(" "); }
//This prints the current iteration value
printf("%d\n",i); }
}//The program ends here
Learn more about program here-
https://brainly.com/question/14618533
#SPJ4