(2)用除以2后的余数来判断奇偶 2 代码 include<stdio.h>int main(){int count, sumEven, sumOdd;count = sumEven = sumOdd = 0;while (++count <= 100)count % 2 == 0 ? (sumEven += count) : (sumOdd += count);printf("偶数和: %d\n奇数和: %d\n", sumEven, sumOdd);...
(2)用除以2后的余数来判断奇偶 2 代码 include<stdio.h>int main(){int count, sumEven, sumOdd;count = sumEven = sumOdd = 0;while (++count <= 100)count % 2 == 0 ? (sumEven += count) : (sumOdd += count);printf("偶数和: %d\n奇数和: %d\n", sumEven, sumOdd);...