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);
printf("hello, world\n");
}
Information
- Submit By
- Type
- Submission
- Problem
- P1022 Minmax
- Contest
- Brain booster - 1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2023-12-31 13:43:24
- Judged At
- 2024-11-11 03:46:36
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes