> ## 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.

# Add Two Numbers Using a Function

> Write a function that takes two integers and returns their sum.

## Problem Statement

Write a C program with a user-defined function that takes two integers as parameters and returns their sum.

## Solution

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

int add(int a, int b) {
    return a + b;
}

int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    printf("Sum = %d\n", add(a, b));
    return 0;
}
```

## Input

```
4 6
```

## Output

```
Sum = 10
```
