C++ 算法提高 偶数还是奇数

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    if(n%2)
    cout<<"odd";
    else
    cout<<"even";
    return 0;
}

相关文章:

  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2021-10-24
猜你喜欢
  • 2021-09-21
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
相关资源
相似解决方案