#include<stdio.h>
int main(void)
{
int dogs; int i=0;
printf("How many dogs do you have?\n");
scanf_s("%d", &dogs);
printf("So you have %d dog(s)!\n", dogs);
return 0;
int main(void)
{
int dogs; int i=0;
printf("How many dogs do you have?\n");
scanf_s("%d", &dogs);
printf("So you have %d dog(s)!\n", dogs);
return 0;
}
编译运行环境:VS2017
问题:输入dogs的之后,程序不打印输出,闪退