The Program in C that Prints the sequence 1, 2, 3, 4, 5…..N is given below:
Enter a year: 2000
202000 is a leap year.
This program prompts the user to enter an integer N, and then uses a for loop to print the sequence of integers from 1 to N.
The loop starts at 1 and increases by 1 each time until it reaches N.
printf statement inside the loop prints the current value of
i each time the loop iterates.
This way the sequence of integers from 1 to N will be printed.