#define _CRT_SECURE_NO_WARNINGS 1#include int main(){ int a = 0, b = 0, sum = 0; //初始化int型a,b,sum scanf("%d %d", &a, &b); //输入a和b的值,以空格隔开 sum = a + b; printf("sum = %d\n", sum); //输出sum的值 return 0;} **scanf_s函数:VS编译器提供的,不是C语言标准规定的,因此scanf_s只能在VS下使用