大家好,我已多次检查我的代码,但我仍然混淆了这个错误来自哪里.... 构建解决方案时出现此错误...
#include<stdio.h>
#include<conio.h>
int add(int a, int b);
int main()
{
int num1, num2, ans;
printf("Please Enter the two numbers :%d %d", num1, num2);
scanf_s("%d %d", &num1, &num2);
ans = add(num1, num2);
return 0;
}
int add(int a, int b)
{
int sum = a + b;
printf("\nSummition is = %d", sum);
}
发现意外的文件结尾错误
答案 0 :(得分:0)
int main() {
int num1, num2, ans;
printf("Enter the two numbers : ");
scanf("%d %d", &num1, &num2);
ans= sum(num1, num2);
printf("\nAddition of two number is : ");
return (0);
}
int sum(int num1, int num2) {
int num3;
num3 = num1 + num2;
return (num3);
}