【C】#奇偶统计#
奇偶统计
https://www.nowcoder.com/practice/04de8eb0ecab426fa6be3ae99af17210
#include <stdio.h> int main() { int n, odd = 0, even = 0; scanf("%d", &n); for(int i = 1; i <= n; i++){ if(i % 2) odd++; else even++; } printf("%d %d", odd, even); return 0; }