Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int addfunc(int num1, int num2) {
- int add = num1 + num2;
- return add;
- }
- int main() {
- int num1, num2, ans;
- printf("Enter 2 ints to add\n");
- scanf("%d %d", &num1, &num2);
- ans = addfunc(num1, num2);
- printf("the result is %d\n", ans);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement