第24967题 单选题
有关func01、func02、func03三个函数的说法错误的是?

三个函数的C++逻辑代码如下:

// func01:判断x是否同时被3和5整除
bool func01(int x) {
    bool result = false;
    if (x % 3 == 0) {
        if (x % 5 == 0) {
            result = true;
        }
    }
    return result;
}

// func02:判断x是否被15整除
bool func02(int x) {
    bool result = false;
    if (x % 15 == 0) {
        result = true;
    }
    return result;
}

// func03:判断x是否被3或5整除
bool func03(int x) {
    bool result = false;
    if (x % 3 == 0 || x % 5 == 0) {
        result = true;
    }
    return result;
}
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析