Skip to content

Commit 4ea1b82

Browse files
authored
Create 10-add.c
1 parent 03b8d26 commit 4ea1b82

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

0x02-functions_nested_loops/10-add.c

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include "main.h"
2+
3+
/**
4+
* add - adds two integers
5+
* @n1: integer 1
6+
* @n2: integer 2
7+
* Description: give two integers, returns sum
8+
* Return: sum
9+
*/
10+
11+
int add(int n1, int n2)
12+
{
13+
int sum;
14+
15+
sum = n1 + n2;
16+
17+
return (sum);
18+
}

0 commit comments

Comments
 (0)