C language - judge common multiples

Enter a positive integer num to determine whether it is  a common multiple of 5 and  7 . If yes, output yes; if not, output no.

#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() 
{
    int num;
    printf("输入一个正整数:");
    scanf("%d", &num);
    if (num % 5 == 0 && num % 7 == 0)
        printf("yes");
    else
        printf("no");
    return 0;
}

Guess you like

Origin blog.csdn.net/qq_54880517/article/details/121939662