Hi.
This is what I have so far
Code:
#include <stdio.h>
int num1;
int num2;
int sum;
int main()
{
scanf("%d", &num1);
scanf("%d", &num2);
printf("Number 1=%d\n", num1);
printf("Number 2=%d\n", num2);
addnumbers(int &num1, int &num2);
return 0;
}
int addnumbers()
{
sum = num1 + num2;
printf("sum is %d", sum);
return 0;
}
I tried to compile it using "gcc calc.c -o calc"
These are the errors I receive. I really need help understanding what they mean and how to fix the issues.
Code:
calc.c: In function ‘main’:
calc.c:21:5: warning: implicit declaration of function ‘addnumbers’ [-Wimplicit-function-declaration]
addnumbers(&num1,&num2);
^~~~~~~~~~
Thank you for your time.