반응형 학부공부/C_Basic13 1. Input and Output[C Basic] 1.1. Write a program that reads an integer and determines and prints whether it is odd or even. [Hint: Use the remainder operator. An even number is a multiple of two. Any multiple of two leaves a remainder of zero when divided by 2.] #include int main() { int a; printf("Input an integer : "); scanf("%d", &a); if (a % 2 == 0) printf("%d is an even integer", a); if(a % 2 == 1) printf("%d is an od.. 2021. 11. 6. 이전 1 2 3 다음 반응형