// 1. 정수 1개 입력받기 / 2. 2, 3, 5중 어떤 수로 나눠떨어지는지
// 1. 모두 = A/ 2. 두개 = B / 3. 1개 = C / 4. x = D
// 입력: 숫자 / 출력: 알파벳 하나
#include <stdio.h>
int main() {
int x;
scanf("%d", &x);
if (x % 30 == 0) {
printf("A");
}
else if (x % 6 == 0 || x % 10 == 0 || x % 15 == 0) {
printf("B");
}
else if (x % 2 == 0 || x % 3 == 0 || x % 5 == 0) {
printf("C");
}
else {
printf("D");
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: