> ## Documentation Index
> Fetch the complete documentation index at: https://learn.acadlink.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Print 1 to N

> Print numbers from 1 to N using a for loop.

## Problem Statement

Write a C program that takes a number N as input and prints all integers from 1 to N using a for loop.

## Solution

```c theme={null}
#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        printf("%d\n", i);
    }
    return 0;
}
```

## Input

```
5
```

## Output

```
1
2
3
4
5
```
