Here's my program and I am getting syntax errors that I don't understand. This is my main that will accept my function data:
int main() //main program
{
float num1, num2, total;
printf("Enter first number: ");
scanf("%f", &num1);
printf("Enter Second number: ");
scanf("%f", & num2);
total = multiNumbers(num1, num2);
printf("sum is %2.f", total);
return 0;
}
int multiNumbers(int num1, int num2) {
int sum;
sum = num1 * num2;
return sum;
}
Here are the compilation errors:
In function 'int main()':
[Error] 'printf' was not declared in this scope
[Error] 'scanf' was not declared in this scope
[Error] 'multiNumbers' was not declared in this scope