#include <stdio.h>
//函数
//计算两个操作数的和
int Add(int x, int y)
{
int z = 0;
z = x + y;
return z;
}
int main()
{
int num1 = 0;
int num2 = 0;
int sum = 0;
printf("请输入两个操作数:>");
scanf_s("%d %d",&num1,&num2);
sum = Add(num1,num2);
printf("sum = %d\n",sum);
return 0;
}
标签:函数,num2,int,sum,Add,printf,num1
From: https://blog.51cto.com/u_16542475/9639162