输入两个数字求和
#include<stdio.h>
int sum(int a,int b)
{
return a + b;
}
int main()
{
int a = 0;
int b = 0;
printf("请输入a b的值:");
scanf("%d%d", &a, &b);
int Sum = sum(a, b);
printf("Sum=%d", Sum);
return 0;
}
运行结果:
请多多指教 有问题请在评论区评论!!!
标签:return,自定义,int,Sum,C语言,printf,心得,sum,输入 From: https://blog.51cto.com/u_16285697/7852610