PackageName
 
Docs
Loading...
Searching...
No Matches
template.h File Reference

Go to the source code of this file.

Functions

int add (int pA, int pB)
 Add two integers.
 
int subtract (int pA, int pB)
 Subtract two integers.
 
int multiply (int pA, int pB)
 

Function Documentation

◆ add()

int add ( int pA,
int pB )

Add two integers.

Parameters
pAFirst integer
pBSecond integer
Returns
int Sum of the two integers

Definition at line 3 of file template.c.

3{ return pA + pB; }

◆ multiply()

int multiply ( int pA,
int pB )

Definition at line 22 of file template.h.

23{
24 int result = 0;
25 int run = 0;
26 for (int i = 0; i < pB; i++) { result = add(result, pA); }
27 return result;
28}
int add(int pA, int pB)
Add two integers.
Definition template.c:3

◆ subtract()

int subtract ( int pA,
int pB )

Subtract two integers.

Parameters
pAFirst integer
pBSecond integer
Returns
int Difference of the two integers

Definition at line 5 of file template.c.

5{ return pA - pB; }