/ SeriousOJ /

Record Detail

Compile Error

foo.c: In function 'main':
foo.c:9:27: error: expected ';' before '{' token
    9 |         } else(z % 2 == 0){
      |                           ^
      |                           ;

Code

#include <stdio.h>

int main()
{
   int x, y, z, odd, even;
	scanf("%d %d %d", &x, &y, &z);
	if(x % 2 == 1 && z % 2 == 1){
		printf("%d", odd);
	} else(z % 2 == 0){
		printf("%d", even);
	}
}

Information

Submit By
Type
Submission
Problem
P1232 Parity
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C99 (GCC 13.2.0)
Submit At
2025-09-02 15:50:37
Judged At
2025-09-02 15:50:37
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes