Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "simpletools.h" // Include simpletools
- int adder(int a, int b); // Function prototype
- int subtracter(int a, int b);
- int main() // main function
- {
- int n = adder(25, 17) + adder(100, 2); // Call adder function
- print("adder's result is = %d\n", n); // Display adder function result
- n = subtracter(25, 17) - subtracter(100,2);
- print("subtracter's result is %d\n",n);
- }
- int adder(int a, int b) // adder function
- {
- int c = a + b; // Add two values
- return c; // Return the result
- }
- int subtracter(int a, int b) // adder function
- {
- int c = a - b; // Add two values
- return c; // Return the result
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement