1.运行报错严重性 代码 说明 项目 文件 行 禁止显示状态错误: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.
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021051209420636.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1E5OTcwNzA3,size_16,color_FFFFFF,t_70#pic_center)
2.关闭项目属性“SDL检查”
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210512094331378.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1E5OTcwNzA3,size_16,color_FFFFFF,t_70#pic_center)
3.顺利运行通过
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021051209444296.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1E5OTcwNzA3,size_16,color_FFFFFF,t_70#pic_center)
4.附上图片的完整测试代码(猜数字)
#include "stdio.h"
#include "conio.h"
void main()
{
int Password=0,Number=0,price=58,i=0;
while( Password != 12345 )
{
if( i >= 3 )
return;
i++;
puts("Please input Password: ");
scanf("%d",&Password);
}
i=0;
while( Number!=price )
{
do{
puts("Please input a number between 1 and 100: ");
scanf("%d",&Number);
printf("Your input number is %d\n",Number);
}while( !(Number>=1 && Number= 90 )
{
printf("Too Bigger! Press any key to try again!\n");
}
else if( Number >= 70 && Number
printf("Too Small! Press any key to try again!\n");
}
else if( Number > 30 && Number
if( Number == price )
{
printf("OK! You are right! Bye Bye!\n");
}
else if( Number |