Fix a bug

This commit is contained in:
xtaodada 2021-10-25 14:00:56 +08:00
parent 717cf8dccf
commit 0fbcec7aa1
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736

View File

@ -9,24 +9,22 @@ int number(int num){
if (a == 0)
first = 0;
printf("3");
if (b == 0)
if (b == 0){
if (first) {
printf("5");
first = 0;
}
else
printf(",5");
// 防止编译器编译时输出警告
else a=a;
if (c == 0)
}
if (c == 0){
if (first) {
printf("7");
first = 0;
}
else
printf(",7");
// 防止编译器编译时输出警告
else a=a;
}
}
else {
printf("Can not be divisible by 3,5,7");