/ SeriousOJ /

Record Detail

Compile Error

foo.c: In function 'main':
foo.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^

Code

#include <stdio.h>

int main()
{   int n1,n2,n3,n4;
	scanf("%d %d %d %d",&n1,&n2,&n3,&n4);
	if(n1<n2 && n1<n3 && n1<n4){
		printf("%d\n",n1);}
	else if(n2<n1 && n2<n3 && n2<n4){
		printf("%d\n",n2);}
	else if(n3<n1 && n3<n2 && n3<n4){
		printf("%d\n",n3);}
	else{
		printf("%d",n4);
	}
	//for highest
	if(n1>n2 && n1>n3 && n1>n4){
		printf("%d\n",n1);}
	else if(n2>n1 && n2>n3 && n2>n4){
		printf("%d\n",n2);}
	else if(n3>n1 && n3>n2 && n3>n4){
		printf("%d\n",n3);}
	else{
		printf("%d\n",n4);
   return 0;
}

Information

Submit By
Type
Submission
Problem
P1022 Minmax
Contest
Brain booster - 1
Language
C99 (GCC 13.2.0)
Submit At
2023-12-31 13:44:45
Judged At
2024-10-03 14:06:31
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes