简单推理题:

考虑两个数和能被3整除,这两个数有什么特点。

多算几个数,便可以找到规律,从2开始以4个循环都是3的倍数

所以写出代码如下:

#include<stdio.h>
int main()
{
 int n;
 while(scanf("%d",&n)!=EOF)
 {
  if(n%4==2)
   printf("yes\n");
  else
   printf("no\n");
 }
 return 0;
}

相关文章:

  • 2021-08-21
  • 2021-07-03
  • 2021-08-08
  • 2021-10-24
  • 2021-06-08
  • 2021-10-06
  • 2021-07-12
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
  • 2021-05-30
  • 2021-06-23
相关资源
相似解决方案