22014的吃瓜群众有问题,比如6分为两半各为3,不是偶数,不可以分,应输出NO,正确代码应为 #include<stdio.h> int main() {     int a,b,c;     scanf("%d",&a);     if(a%2==0){         b=a/2;         c=b%2;         if(c==0&&a>2)         printf("YES, you can divide the watermelon into two even parts.");         else             printf("NO, you can't divide the watermelon into two even parts.");     }     else         printf("NO, you can't divide the watermelon into two even parts.");     return 0; }

相关推荐

2025-12-21 12:26
同济大学 Java
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务