题解 | #牛牛的二三七整除#
牛牛的二三七整除
https://www.nowcoder.com/practice/b2cf0b791245436f8f0591ae9f4c664f
#include <stdio.h> int main() { int a ; int arr[3] = { 2, 3 , 7}; int temp = 0; int sz = sizeof(arr) / sizeof(arr[0]); scanf("%d",&a); for(int i = 0 ; i < sz ; i++) { if((a % arr[i] ) == 0) { temp = 1; printf("%d ",arr[i]); } } if(temp == 0) printf("n"); return 0; }