Skip to content

Commit 4b44d87

Browse files
author
Shell-thon
committed
update
1 parent 3ada9af commit 4b44d87

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
4+
/**
5+
* add - adds two integers
6+
* sub - subtracts two integers
7+
* mul - multiplies two integers
8+
* div - divides two integers
9+
* mod - finds the modulus of two integers
10+
*
11+
* Return: addition substraction division modulus and product of two integers
12+
*/
13+
int add(int a, int b)
14+
{
15+
return (a + b);
16+
}
17+
18+
int sub(int a, int b)
19+
{
20+
return (a - b);
21+
}
22+
23+
int mul(int a, int b)
24+
{
25+
return (a * b);
26+
}
27+
28+
int div(int a, int b)
29+
{
30+
return (a / b);
31+
}
32+
33+
int mod(int a, int b)
34+
{
35+
return (a % b);
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
4+
/**
5+
* add - adds two integers
6+
* sub - subtracts two integers
7+
* mul - multiplies two integers
8+
* div - divides two integers
9+
* mod - finds the modulus of two integers
10+
*
11+
* Return: addition substraction division modulus and product of two integers
12+
*/
13+
int add(int a, int b)
14+
{
15+
return a + b;
16+
}
17+
18+
int sub(int a, int b)
19+
{
20+
return a - b;
21+
}
22+
23+
int mul(int a, int b)
24+
{
25+
return a * b;
26+
}
27+
28+
int div(int a, int b)
29+
{
30+
return a / b;
31+
}
32+
33+
int mod(int a, int b)
34+
{
35+
return a % b;
36+
}

0 commit comments

Comments
 (0)