int price = 0;
printf("请输入商品价格");
scanf("%d", &price);
if(price<50)
{
printf("买下它。");
}
else
{
printf("不买");
}
getch();
错误
错误 1 error C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. e:\vs\c\c\c.cpp 25 1 C