criyle/codenet-compile-errors huggingface dataset:
Language: Java


import java.util.Scanner;

public class ITP1_4_D {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] num = new int[n];

		for (int i = 0; i < n; i++) {
			num[i] = sc.nextInt();
		}

		int max = num[0];
		int min = num[0];
		long sum = 0;

		for (int a : num) {
			if (a > max) {
				max = a;
			}
			if (a < min) {
				min = a;
			}
			sum += a;
		}
		System.out.println(min + " " + max + " " + sum);
		sc.close();
	}

}



Compiler output:
Main.java:4: error: class ITP1_4_D is public, should be declared in a file named ITP1_4_D.java
public class ITP1_4_D {
       ^
1 error
Language: Java

import java.util.Scanner;

public class MMS{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextlong();

        int[] a = new int[n];

        for(int i = 0; i < n; i++){
            a[i] = sc.nextInt();
        }

        int min = a[0];
        int max = a[0];
        int sum = a[0];

        for(int i = 1; i < n; i++){
            min = Math.min(min,a[i]);
            max = Math.max(max,a[i]);
            sum += a[i];
        }

        System.out.println( min + " " + max + " " + sum);

    }
}


Compiler output:
Main.java:3: error: class MMS is public, should be declared in a file named MMS.java
public class MMS{
       ^
Main.java:6: error: cannot find symbol
        long n = sc.nextlong();
                   ^
  symbol:   method nextlong()
  location: variable sc of type Scanner
Main.java:8: error: incompatible types: possible lossy conversion from long to int
        int[] a = new int[n];
                          ^
3 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[]args){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();

        int[] a = new int[n];

        for(int i = 0; i < n; i++){
            a[i] = sc.nextInt();
        }

        int min = a[0];
        int max = a[0];
        int sum = a[0];

        for(int i = 1; i < n; i++){
            min = Math.min(min,a[i]);
            max = Math.max(max,a[i]);
            sum += a[i];
        }

        System.out.println( min + " " + max + " " + sum);

    }
}


Compiler output:
Main.java:8: error: incompatible types: possible lossy conversion from long to int
        int[] a = new int[n];
                          ^
1 error
Language: Java

import java.util.Scanner;

import com.sun.org.apache.xml.internal.utils.res.LongArrayWrapper;

public class Main{
  
  public static void main(String[] args) {
    
    Scanner sin = new Scanner(System.in);

    int n = sin.nextInt();
    int[] a = new int[n];
    a[0] = sin.nextInt();
    int min = a[0];
    int max = a[0];
    long sum = a[0];

    for ( int i = 1; i < a.length; i++) {
      a[i] = sin.nextInt();
      if(a[i] < min) min = a[i];
      else if(a[i] > max) max = a[i];
      sum += (long)a[i];
    }

    System.out.println(min + " " + max + " " + sum);
    sin.close();
  }
}


Compiler output:
Main.java:3: error: package com.sun.org.apache.xml.internal.utils.res is not visible
import com.sun.org.apache.xml.internal.utils.res.LongArrayWrapper;
                                            ^
  (package com.sun.org.apache.xml.internal.utils.res is declared in module java.xml, which does not export it)
1 error
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		while(true){
			int H = sc.nextInt();
			int W = sc.nextInt();
			if(H == 0 && W == 0)break;
			
			for(int i=0; i < H; i++){
				for(int j=0; j < W; j++);
				System.out.print("#");
			}
			System.out.println("");
		}
		System.out.println("");
}

		sc.close();
	}
}


Compiler output:
Main.java:20: error: <identifier> expected
		sc.close();
		        ^
Main.java:22: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] data = new int[n];
        for(i=0; i<n; i++) data[i] = sc.nextInt();
        int i;
        int max,min,sum=0;
        max = data[0]; min = data[0];
        for(i=0; i<n; i++){
            if(max < data[i]) max = data[i];
            if(min > data[i]) min = data[i];
            sum += data[i];
        }
        System.out.printf("%d %d %d", min, max, sum);
    }
}


Compiler output:
Main.java:8: error: cannot find symbol
        for(i=0; i<n; i++) data[i] = sc.nextInt();
            ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
        for(i=0; i<n; i++) data[i] = sc.nextInt();
                 ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
        for(i=0; i<n; i++) data[i] = sc.nextInt();
                      ^
  symbol:   variable i
  location: class Main
Main.java:8: error: cannot find symbol
        for(i=0; i<n; i++) data[i] = sc.nextInt();
                                ^
  symbol:   variable i
  location: class Main
4 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        long int n = sc.nextInt();
        int[] data = new int[n];
        int i;
        for(i=0; i<n; i++) data[i] = sc.nextInt();
        int max,min,sum=0;
        max = data[0]; min = data[0];
        for(i=0; i<n; i++){
            if(max < data[i]) max = data[i];
            if(min > data[i]) min = data[i];
            sum += data[i];
        }
        System.out.printf("%d %d %d\n", min, max, sum);
    }
}


Compiler output:
Main.java:6: error: not a statement
        long int n = sc.nextInt();
        ^
Main.java:6: error: ';' expected
        long int n = sc.nextInt();
            ^
2 errors
Language: Java

import java.io.*;
import java.util.Scanner;
import java.math.*;

class Main{
    public static void main(String[] args) throws IOException
    {
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] data = makeint(br);

        System.out.println("2 3 4");

        return;
        int maximum, minimum, sum = data[0];

        maximum = data[0];
        minimum = data[0];
        for(int i = 1; i < n; i++){
            maximum = Math.max(maximum, data[i]);
            minimum = Math.min(minimum, data[i]);
            sum += data[i];
        }
        System.out.println(maximum + " " + minimum + " " + sum);
    }

    public static int[] makeint(BufferedReader br) throws IOException
    {
        String[] str = br.readLine().split(" ");
        int n = str.length;
        int[] a = new int[n];
        for(int i = 0; i < n; i++){ a[i] = Integer.parseInt(str[i]); }
        return a;
    }
}


Compiler output:
Main.java:17: error: unreachable statement
        int maximum, minimum, sum = data[0];
            ^
1 error
Language: Java

import java.io.*;
import java.util.Scanner;
import java.math.*;

class Main{
    public static void main(String[] args) throws IOException
    {
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] data = makeint(br);

        System.out.println("2 3 4");

        int maximum, minimum, sum = data[0];
        return;         

        maximum = data[0];
        minimum = data[0];
        for(int i = 1; i < n; i++){
            maximum = Math.max(maximum, data[i]);
            minimum = Math.min(minimum, data[i]);
            sum += data[i];
        }
        System.out.println(maximum + " " + minimum + " " + sum);
    }

    public static int[] makeint(BufferedReader br) throws IOException
    {
        String[] str = br.readLine().split(" ");
        int n = str.length;
        int[] a = new int[n];
        for(int i = 0; i < n; i++){ a[i] = Integer.parseInt(str[i]); }
        return a;
    }
}


Compiler output:
Main.java:19: error: unreachable statement
        maximum = data[0];
        ^
1 error
Language: Java

import java.util.Scanner;
class Main{
 public static void main(String args[]){
  long int max,min,n,g,i,j;
  max=-1000001;min=1000001;g=0;i=0;
  Scanner sc = new Scanner(System.in);
  n=sc.nectInt();
  while(i<n){
   j=sc.nextInt();
   if(max<j)
    max=j;
   if(min>j)
    min=j;
   g+=j;
   i++;}
  System.out.println(min+" "+max+" "+g);
 }
}


Compiler output:
Main.java:4: error: not a statement
  long int max,min,n,g,i,j;
  ^
Main.java:4: error: ';' expected
  long int max,min,n,g,i,j;
      ^
2 errors
Language: Java

import java.util.Scanner;
class Main{
 public static void main(String args[]){
  long max,min,n,g,i,j;
  max=-1000001;min=1000001;g=0;i=0;
  Scanner sc = new Scanner(System.in);
  n=sc.nectInt();
  while(i<n){
   j=sc.nextInt();
   if(max<j)
    max=j;
   if(min>j)
    min=j;
   g+=j;
   i++;}
  System.out.println(min+" "+max+" "+g);
 }
}


Compiler output:
Main.java:7: error: cannot find symbol
  n=sc.nectInt();
      ^
  symbol:   method nectInt()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.Scanner;

public class ITP14D {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		int n = Integer.parseInt(input);
		String input2 = sc.nextLine();
		String[] data = input2.split(" ");
		int Min = Integer.parseInt(data[0]);
		int Max = Min;
		long Sum = Min;
		int value = 0;
		boolean judge = true;

		if ((n == data.length) && (n >= 0 && n <= 10000)) {

			out: for (int i = 1; i < data.length; i++) {
				value = Integer.parseInt(data[i]);
				if (value < -1000000 || value > 1000000) {
					judge = false;
					break out;
				}
				if (Max < value) {
					Max = value;
				}
				if (Min > value) {
					Min = value;
				}
				Sum += value;
			}

			if (judge == true) {
				System.out.println(Min + " " + Max + " " + Sum);
			}

		}

	}
}



Compiler output:
Main.java:3: error: class ITP14D is public, should be declared in a file named ITP14D.java
public class ITP14D {
       ^
1 error
Language: Java

import java.util.Scanner;

public class ITP1_4_D {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		String line2 = sc.nextLine();

		int count = Integer.parseInt(line1);

		String[] num = line2.split(" ");

		int n = Integer.parseInt(num[0]);
		int m = Integer.parseInt(num[0]);

		int result = 0;

		for (int i = 0; i < count; i++) {

			if (m > Integer.parseInt(num[i])) {
				m = Integer.parseInt(num[i]);
			}
			if (n < Integer.parseInt(num[i])) {
				n = Integer.parseInt(num[i]);
			}

			result += Integer.parseInt(num[i]);
		}
		System.out.println(m + " " + n + " " + result);
	}
}



Compiler output:
Main.java:3: error: class ITP1_4_D is public, should be declared in a file named ITP1_4_D.java
public class ITP1_4_D {
       ^
1 error
Language: Java

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
using namespace std;


int main() {
	
	int a[10000];
	int size;


	cin >> size;

	cin >> a[0];

	int max = a[0];
	int min = a[0];
	long long sum = a[0];

	for (int i = 1; i < size; i++) {
		cin >> a[i];

		if (max < a[i])max = a[i];
		if (min > a[i])min = a[i];
		sum += a[i];
	}



	printf("%d %d %d\n", min, max, sum);



	


	//system("pause");
	return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<stdio.h>
        ^
Main.java:2: error: illegal character: '#'
#include<stdlib.h>
^
Main.java:3: error: illegal character: '#'
#include<math.h>
^
Main.java:4: error: illegal character: '#'
#include<iostream>
^
Main.java:14: error: not a statement
	cin >> size;
	    ^
Main.java:16: error: not a statement
	cin >> a[0];
	    ^
Main.java:20: error: not a statement
	long long sum = a[0];
	^
Main.java:23: error: not a statement
		cin >> a[i];
		    ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
Main.java:10: error: ']' expected
	int a[10000];
	      ^
Main.java:20: error: ';' expected
	long long sum = a[0];
	    ^
12 errors
Language: Java

import java.util.Scanner;

class Main{
   private static int n,min,max,ip;
 private static Long sum;

    
  public static void main(String[] args){
    
    Scanner s= new Scanner(System.in);
   
  n=s.nextInt();
  ip=s.nextInt();
  for(int i=0;i<n;i++){
      
      ip=s.nextInt();
      
      min=ip;
      max=ip;
      sum=ip;
      
      if(min>ip){
          min=ip;
      }
      if(max<ip){
          max=ip;
      }
      x+=ip;
      
  }
      System.out.println(min+" "+max+" "+sum);
      
      
  }}


Compiler output:
Main.java:20: error: incompatible types: int cannot be converted to Long
      sum=ip;
          ^
Main.java:28: error: cannot find symbol
      x+=ip;
      ^
  symbol:   variable x
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

class Main{
   private static int n,min,max,ip;
 private static Long sum;

    
  public static void main(String[] args){
    
    Scanner s= new Scanner(System.in);
   
  n=s.nextInt();
  ip=s.nextInt();
  for(int i=0;i<n;i++){
      
      ip=s.nextInt();
      
      min=ip;
      max=ip;
      sum=ip;
      
      if(min>ip){
          min=ip;
      }
      if(max<ip){
          max=ip;
      }
      sum+=ip;
      
  }
      System.out.println(min+" "+max+" "+sum);
      
      
  }}


Compiler output:
Main.java:20: error: incompatible types: int cannot be converted to Long
      sum=ip;
          ^
1 error
Language: Java

import java.util.Scanner;
public class MinMax {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int sum = 0;
		int max = 0;
		int min = 0;
		int i = Integer.parseInt(scan.next());
		int[] ary = new int[i];
		for(int a=0;a<i;a++){
			ary[a]=Integer.parseInt(scan.next());
			if(a==0) min=ary[a];
			sum+=ary[a];
			if(ary[a]>max) max = ary[a];
			if(min>ary[a]) min = ary[a];
		}
		System.out.print(min+" "+max+" "+sum);
		scan.close();
	}
}

Compiler output:
Main.java:2: error: class MinMax is public, should be declared in a file named MinMax.java
public class MinMax {
       ^
1 error
Language: C

#include<stdio.h>
int main (void){
	long long n,a,m,M,c,b,i;
	c = o;
	m = 100000000;
	M = -100000000;
	scanf("%lld",&n);
	
	for( i=1; i<=n; i++ ){
		scanf("%lld",&a);
		if(a>M){
			M = a;
		}
		if(a < m){
			m = a;
		}
		c = c + a;
	}
	printf("%lld %lld %lld\n",m,M,c);
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:13: error: 'o' undeclared (first use in this function)
    4 |         c = o;
      |             ^
main.c:4:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
int n,i;
long long a[i],min, max, sum = 0;
printf("整数を入力してください："); scanf("%d", &n);
printf("整数をさっき入力した数だけ入力してください。");
min = max = a[0]
for (i=1; i<n+1; i++){
 scanf("%ld", &a[i]);
if (a[i] > max ) max = a[i];
if (a[i] < min ) min = a[i];
sum += a[i];
}
return 0;
}





Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected ';' before 'for'
    7 | min = max = a[0]
      |                 ^
      |                 ;
    8 | for (i=1; i<n+1; i++){
      | ~~~
Language: C

#include <stdio.h>
int main(){
int n,i;
long long a[i],min, max, sum = 0;
printf("整数を入力してください："); scanf("%d", &n);
printf("整数をさっき入力した数だけ入力してください。");
min = max = a[0];
for (i=1; i<n+1; i++){
 scanf("%lld", &a[i]);
if (a[i] > max ) max = a[i];
if (a[i] < min ) min = a[i];
sum += a[i];
}
printf("%lld %lld %lld", min max sum);
return 0;
}





Compiler output:
main.c: In function 'main':
main.c:14:29: error: expected ')' before 'max'
   14 | printf("%lld %lld %lld", min max sum);
      |       ~                     ^~~~
      |                             )
Language: C

#include <stdio.h>
int main(){
int n,i;
long long m,min, max, sum = 0;
scanf("%d", &n);
min = max = 0;
for (i=1; i<n+1; i++){
scanf("%lld", &m);
if (m > max ) max =m];
if (m < min ) min = m;
sum += m;
}
printf("%d %d %lld\n", min, max, sum);
return 0;
}





Compiler output:
main.c: In function 'main':
main.c:9:21: error: expected ';' before ']' token
    9 | if (m > max ) max =m];
      |                     ^
      |                     ;
main.c:9:21: error: expected statement before ']' token
Language: C

#include <stdio.h>
int main(){
int n, i, m, min, max;
long long sum = 0;
scanf("%d", &n);
min = 1000001;
max = -1000001
for (i=1; i<n+1; i++){
scanf("%lld", &m);
if (m > max ) {max =m;}
if (m < min ) {min = m;}
sum =sum + m;
}
printf("%d %d %lld\n", min, max, sum);
return 0;
}





Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected ';' before 'for'
    7 | max = -1000001
      |               ^
      |               ;
    8 | for (i=1; i<n+1; i++){
      | ~~~
Language: C

*#include <stdio.h>
int main(void)
{
    int max,min,j,i,*p,n;
    long long sum=0;
    scanf("%d",&n);
    int a[n];
    p=a;

    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
        sum=sum+a[i];
    }
    i=0;
        max=i; min=i;
        for(j=i+1;j<n;j++)
            {if(*(p+j)>*(p+max))
                max=j;
            if(*(p+j)<*(p+min))
                min=j;
            }
    printf("%d %d %lld\n",a[min],a[max],sum);
    return 0;
}


Compiler output:
main.c:1:2: error: stray '#' in program
    1 | *#include <stdio.h>
      |  ^
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | *#include <stdio.h>
      |           ^
Language: C

#include <stdio.h>
int main(void){
    int a, i, n, min, max;
    long long s;
    
    min=-1000000; 
    max=1000000;

    s = 0;
    
    scanf("%d", &n);
    
    0 < n <= 10000;
    
    for (i = 0; i < n; i++){
        scanf("%d", &a);
        s += a;
        
        if(a < min){
            min = a;
        }
        if(a > max){
            max = a;
        }
    }
    
    printf("%d %d %lld\n", min, max, s);

    return(0);
    


Compiler output:
main.c: In function 'main':
main.c:29:5: error: expected declaration or statement at end of input
   29 |     return(0);
      |     ^~~~~~
Language: C

#include <stdio.h>
int main(void){
    int a, i, n, min, max;
    long long s;
    
    min=-1000000; 
    max=1000000;

    s = 0;
    
    scanf("%d", &n);
    
    0 < n <= 10000;
    
    for (i = 0; i < n; i++){
        scanf("%d", &a);
        s += a;
        
        if(a < min){
            min = a;
        }
        if(a > max){
            max = a;
        }
    }
    
    printf("%d %d %lld\n", min, max, s);

    return(0);
｝
    


Compiler output:
main.c: In function 'main':
main.c:30:1: error: '\U0000ff5d' undeclared (first use in this function)
   30 | ｝
      | ^~
main.c:30:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:3: error: expected ';' at end of input
   30 | ｝
      |   ^
      |   ;
   31 | 
main.c:30:1: error: expected declaration or statement at end of input
   30 | ｝
      | ^~
Language: C

#include<stdio.h>
int main(){
	int num, i;
	int work;
	int sum = 0, min = 1000000, max = −1000000;
	scanf("%d", &num);
	for(i = 0;i < num;i++){
		scanf("%d", &work);
		sum += work;
		if(work > min)min = work;
		if(work < max)max = work;
	}
	printf("%d %d %d", min, max, sum);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:43: error: stray '\342' in program
    5 |         int sum = 0, min = 1000000, max = <U+2212>1000000;
      |                                           ^~~~~~~~
Language: C

#include<stdio.h>
int main(void)
{
	int n, i;
	sum = 0;
	scanf("%d", &n);
	long a[1024], max, min, sum;


	scanf("%d", &a[1]);
	sum = max = min = a[1];


	for (i = 2; i <= n; i++)
	{
		scanf("%d", &a[i]);



		sum = sum + a[i];

		if (max < a[i])
		{
			max = a[i];
		}
		if (min  > a[i])
		{
			min = a[i];
		}

	}

	printf("%d %d %d\n", min, max, sum);

	return 0;



}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'sum' undeclared (first use in this function)
    5 |         sum = 0;
      |         ^~~
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<iostream>
#include<stdio.h>
using namespace std;

/* 宣言・初期化・配列の復習 */

int main(void){

    /* 宣言と初期化 */
    int hai[]={8,10,4,7,9};
    int i;
    int tempmin;
    int tempmax;
    int ans;

    /* 代入 */
    tempmin=hai[0];
    tempmax=hai[0];
    ans=0;

    /* 計算 */
    for(i=0;i<=4;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
        tempmax=hai[i];
        /* 最小値求める */
        if(hai[i]<tempmin)
        tempmin=hai[i];
        /* 合計値求める */
        ans=ans+hai[i];
    }

    /* 表示 */
    printf("最小値=%d\n",tempmin);
    printf("最大値=%d\n",tempmax);
    printf("合計値=%d\n",ans);

    return 0;
}



Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C


#include <stdio.h>

int main() {
	int n;
	int tmp;
	int max = -10001;
	int min = 10001;
	long long int sum = 0;
	scanf_s("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d",&tmp);
		if (max <= tmp) {
			max = tmp;
		}
		if (tmp <= min) {
			min = tmp;
		}
		sum += tmp;
	}
	printf("%d %d %lld", min, max, sum);
	
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main(){
    int n,i,a[10000],min=1000000,max=-1000000;
    lonb long int sum-0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
          scanf("%d",&a[i]);
          }
    for(i=0;i<n;i++){
          if(min<a[i]){min=a[i];}
          }
    for(i=0;i<n;i++){
          if(max>a[i]){max=a[i];}
          }
    for(i=0;i<n;i++){
          sum+=a[i];
          }
    printf("%d %d %lld\n",min,max,sum);
    return 0;
    }


Compiler output:
main.c: In function 'main':
main.c:5:5: error: 'lonb' undeclared (first use in this function)
    5 |     lonb long int sum-0;
      |     ^~~~
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:9: error: expected ';' before 'long'
    5 |     lonb long int sum-0;
      |         ^~~~~
      |         ;
main.c:17:11: error: 'sum' undeclared (first use in this function)
   17 |           sum+=a[i];
      |           ^~~
Language: C

#include<stdio.h>

int main(){
    int n,i,a[10000],min=1000000,max=-1000000;
    lonb long int sum=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
          scanf("%d",&a[i]);
          }
    for(i=0;i<n;i++){
          if(min<a[i]){min=a[i];}
          }
    for(i=0;i<n;i++){
          if(max>a[i]){max=a[i];}
          }
    for(i=0;i<n;i++){
          sum+=a[i];
          }
    printf("%d %d %lld\n",min,max,sum);
    return 0;
    }


Compiler output:
main.c: In function 'main':
main.c:5:5: error: 'lonb' undeclared (first use in this function)
    5 |     lonb long int sum=0;
      |     ^~~~
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:9: error: expected ';' before 'long'
    5 |     lonb long int sum=0;
      |         ^~~~~
      |         ;
main.c:17:11: error: 'sum' undeclared (first use in this function)
   17 |           sum+=a[i];
      |           ^~~
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  int num[];
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num,&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[],int *min,int *max,int sum)
{
  *min=1000000;
  *max=0;
  i=0;
  while(i!=n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: array size missing in 'num'
    6 |   int num[];
      |       ^~~
main.c: In function 'minmax':
main.c:19:3: error: 'i' undeclared (first use in this function)
   19 |   i=0;
      |   ^
main.c:19:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  scanf("%d",&n);
  int num[n];
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[n],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[n],int *min,int *max,int sum)
{
  *min=1000000;
  *max=0;
  for(int j=0;j<n;j++){
     num[j]+=num[j++];
  }
  i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c: In function 'main':
main.c:11:15: error: passing argument 2 of 'minmax' makes pointer from integer without a cast [-Wint-conversion]
   11 |   minmax(n,num[n],&min,&max,sum);
      |            ~~~^~~
      |               |
      |               int
main.c:2:22: note: expected 'int *' but argument is of type 'int'
    2 | int minmax(int n,int num[],int *min,int *max,int sum);
      |                  ~~~~^~~~~
main.c: In function 'minmax':
main.c:22:3: error: 'i' undeclared (first use in this function)
   22 |   i=0;
      |   ^
main.c:22:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  scanf("%d",&n);
  int num[n];
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[n],&min,&max,sum);
  printf("%d %d %d\n",*min,*max,sum);
  return 0;
}
int minmax(int n,int num[n],int *min,int *max,int sum)
{
  *min=0;
  *max=0;
  for(int j=0;j<n;j++){
     num[j]+=num[j++];
  }
  int i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c: In function 'main':
main.c:11:15: error: passing argument 2 of 'minmax' makes pointer from integer without a cast [-Wint-conversion]
   11 |   minmax(n,num[n],&min,&max,sum);
      |            ~~~^~~
      |               |
      |               int
main.c:2:22: note: expected 'int *' but argument is of type 'int'
    2 | int minmax(int n,int num[],int *min,int *max,int sum);
      |                  ~~~~^~~~~
main.c:12:23: error: invalid type argument of unary '*' (have 'int')
   12 |   printf("%d %d %d\n",*min,*max,sum);
      |                       ^~~~
main.c:12:28: error: invalid type argument of unary '*' (have 'int')
   12 |   printf("%d %d %d\n",*min,*max,sum);
      |                            ^~~~
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  scanf("%d",&n);
  int num[n];
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[],int *min,int *max,int sum)
{
  *min=0;
  *max=0;
  for(int j=0;j<n;j++){
     num[j]+=num[j++];
  }
  int i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c: In function 'main':
main.c:11:16: error: expected expression before ']' token
   11 |   minmax(n,num[],&min,&max,sum);
      |                ^
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  scanf("%d",&n);
  int num[n];
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[],int *min,int *max,int sum)
{
  *min=0;
  *max=0;
  int sum=0;
  for(int j=0;j<n;j++){
     sum+=num[j];
  }
  int i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c: In function 'main':
main.c:11:16: error: expected expression before ']' token
   11 |   minmax(n,num[],&min,&max,sum);
      |                ^
main.c: In function 'minmax':
main.c:19:7: error: 'sum' redeclared as different kind of symbol
   19 |   int sum=0;
      |       ^~~
main.c:15:50: note: previous definition of 'sum' with type 'int'
   15 | int minmax(int n,int num[],int *min,int *max,int sum)
      |                                              ~~~~^~~
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  scanf("%d",&n);
  int num[n];
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[],int *min,int *max,int sum)
{
  *min=0;
  *max=0;
  sum=0;
  for(int j=0;j<n;j++){
     sum+=num[j];
  }
  int i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c: In function 'main':
main.c:11:16: error: expected expression before ']' token
   11 |   minmax(n,num[],&min,&max,sum);
      |                ^
Language: C

#include<stdio.h>
int minmax(int,int,*int,*int,int);
int main(void)
{
  int n,min,max,sum;
  scanf("%d",&n);
  int num[n];
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[],int *min,int *max,int sum)
{
  *min=0;
  *max=0;
  sum=0;
  for(int j=0;j<n;j++){
     sum+=num[j];
  }
  int i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c:2:20: error: expected declaration specifiers or '...' before '*' token
    2 | int minmax(int,int,*int,*int,int);
      |                    ^
main.c:2:25: error: expected declaration specifiers or '...' before '*' token
    2 | int minmax(int,int,*int,*int,int);
      |                         ^
main.c: In function 'main':
main.c:11:3: error: implicit declaration of function 'minmax' [-Wimplicit-function-declaration]
   11 |   minmax(n,num[],&min,&max,sum);
      |   ^~~~~~
main.c:11:16: error: expected expression before ']' token
   11 |   minmax(n,num[],&min,&max,sum);
      |                ^
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  int num[]
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[],int *min,int *max,int sum)
{
  *min=0;
  *max=0;
  sum=0;
  for(int j=0;j<n;j++){
     sum+=num[j];
  }
  int i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c: In function 'main':
main.c:7:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    7 |   scanf("%d",&n);
      |   ^~~~~
main.c:9:17: error: 'num' undeclared (first use in this function); did you mean 'sum'?
    9 |     scanf("%d",&num[i]);
      |                 ^~~
      |                 sum
main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:16: error: expected expression before ']' token
   11 |   minmax(n,num[],&min,&max,sum);
      |                ^
Language: C

#include<stdio.h>
int minmax(int n,int num[],int *min,int *max,int sum);
int main(void)
{
  int n,min,max,sum;
  int num[];
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
int minmax(int n,int num[],int *min,int *max,int sum)
{
  *min=0;
  *max=0;
  sum=0;
  for(int j=0;j<n;j++){
     sum+=num[j];
  }
  int i=0;
  while(i<n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
    
  }
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: array size missing in 'num'
    6 |   int num[];
      |       ^~~
main.c:11:16: error: expected expression before ']' token
   11 |   minmax(n,num[],&min,&max,sum);
      |                ^
Language: C

#include<stdio.h>
void minmax(int n,int num[],int min,int max, int sum);
int main(void)
{
  int n,num[],min,max,sum;
  scanf("%d",&n)
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
void minmax(int n,int num[],int min,int max,int sum)
{
  int i=0;
  *min=0;
  *max=0;
  for(int j=0;j<n;j++){
    sum+=num[j];
  }
  while(i!=n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: array size missing in 'num'
    5 |   int n,num[],min,max,sum;
      |         ^~~
main.c:6:17: error: expected ';' before 'for'
    6 |   scanf("%d",&n)
      |                 ^
      |                 ;
    7 |   for(int i=0;i<n;i++){
      |   ~~~            
main.c: In function 'minmax':
main.c:17:3: error: invalid type argument of unary '*' (have 'int')
   17 |   *min=0;
      |   ^~~~
main.c:18:3: error: invalid type argument of unary '*' (have 'int')
   18 |   *max=0;
      |   ^~~~
main.c:23:15: error: invalid type argument of unary '*' (have 'int')
   23 |     if(num[i]>*max){
      |               ^~~~
main.c:24:7: error: invalid type argument of unary '*' (have 'int')
   24 |       *max=num[i];
      |       ^~~~
main.c:26:15: error: invalid type argument of unary '*' (have 'int')
   26 |     if(num[i]<*min){
      |               ^~~~
main.c:27:7: error: invalid type argument of unary '*' (have 'int')
   27 |       *min=num[i];
      |       ^~~~
Language: C

#include<stdio.h>
void minmax(int n,int num[n],int min,int max, int sum);
int main(void)
{
  int n,num[n],min,max,sum;
  scanf("%d",&n)
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[n],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
void minmax(int n,int num[n],int min,int max,int sum)
{
  int i=0;
  *min=0;
  *max=0;
  for(int j=0;j<n;j++){
    sum+=num[j];
  }
  while(i!=n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:6:17: error: expected ';' before 'for'
    6 |   scanf("%d",&n)
      |                 ^
      |                 ;
    7 |   for(int i=0;i<n;i++){
      |   ~~~            
main.c: In function 'minmax':
main.c:17:3: error: invalid type argument of unary '*' (have 'int')
   17 |   *min=0;
      |   ^~~~
main.c:18:3: error: invalid type argument of unary '*' (have 'int')
   18 |   *max=0;
      |   ^~~~
main.c:23:15: error: invalid type argument of unary '*' (have 'int')
   23 |     if(num[i]>*max){
      |               ^~~~
main.c:24:7: error: invalid type argument of unary '*' (have 'int')
   24 |       *max=num[i];
      |       ^~~~
main.c:26:15: error: invalid type argument of unary '*' (have 'int')
   26 |     if(num[i]<*min){
      |               ^~~~
main.c:27:7: error: invalid type argument of unary '*' (have 'int')
   27 |       *min=num[i];
      |       ^~~~
Language: C

#include<stdio.h>
void minmax(int n,int num[n],int min,int max, int sum);
int main(void)
{
  int n,num[n],min,max,sum;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[n],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
void minmax(int n,int num[n],int min,int max,int sum)
{
  int i=0;
  *min=0;
  *max=0;
  for(int j=0;j<n;j++){
    sum+=num[j];
  }
  while(i!=n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:10:15: error: passing argument 2 of 'minmax' makes pointer from integer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |            ~~~^~~
      |               |
      |               int
main.c:2:23: note: expected 'int *' but argument is of type 'int'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                   ~~~~^~~~~~
main.c:10:19: error: passing argument 3 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                   ^~~~
      |                   |
      |                   int *
main.c:2:34: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                              ~~~~^~~
main.c:10:24: error: passing argument 4 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                        ^~~~
      |                        |
      |                        int *
main.c:2:42: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                                      ~~~~^~~
main.c: In function 'minmax':
main.c:17:3: error: invalid type argument of unary '*' (have 'int')
   17 |   *min=0;
      |   ^~~~
main.c:18:3: error: invalid type argument of unary '*' (have 'int')
   18 |   *max=0;
      |   ^~~~
main.c:23:15: error: invalid type argument of unary '*' (have 'int')
   23 |     if(num[i]>*max){
      |               ^~~~
main.c:24:7: error: invalid type argument of unary '*' (have 'int')
   24 |       *max=num[i];
      |       ^~~~
main.c:26:15: error: invalid type argument of unary '*' (have 'int')
   26 |     if(num[i]<*min){
      |               ^~~~
main.c:27:7: error: invalid type argument of unary '*' (have 'int')
   27 |       *min=num[i];
      |       ^~~~
Language: C

#include<stdio.h>
void minmax(int n,int num[n],int min,int max, int sum);
int main(void)
{
  int n,num[n],min,max,sum;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[n],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
void minmax(int n,int num[n],int min,int max,int sum)
{
  int i=0;
  *min=1000000;
  *max=0;
  for(int j=0;j<n;j++){
    sum+=num[j];
  }
  while(i!=n){
    if(num[i]>*max){
      *max=num[i];
    }
    if(num[i]<*min){
      *min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:10:15: error: passing argument 2 of 'minmax' makes pointer from integer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |            ~~~^~~
      |               |
      |               int
main.c:2:23: note: expected 'int *' but argument is of type 'int'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                   ~~~~^~~~~~
main.c:10:19: error: passing argument 3 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                   ^~~~
      |                   |
      |                   int *
main.c:2:34: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                              ~~~~^~~
main.c:10:24: error: passing argument 4 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                        ^~~~
      |                        |
      |                        int *
main.c:2:42: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                                      ~~~~^~~
main.c: In function 'minmax':
main.c:17:3: error: invalid type argument of unary '*' (have 'int')
   17 |   *min=1000000;
      |   ^~~~
main.c:18:3: error: invalid type argument of unary '*' (have 'int')
   18 |   *max=0;
      |   ^~~~
main.c:23:15: error: invalid type argument of unary '*' (have 'int')
   23 |     if(num[i]>*max){
      |               ^~~~
main.c:24:7: error: invalid type argument of unary '*' (have 'int')
   24 |       *max=num[i];
      |       ^~~~
main.c:26:15: error: invalid type argument of unary '*' (have 'int')
   26 |     if(num[i]<*min){
      |               ^~~~
main.c:27:7: error: invalid type argument of unary '*' (have 'int')
   27 |       *min=num[i];
      |       ^~~~
Language: C

#include<stdio.h>
void minmax(int n,int num[n],int min,int max, int sum);
int main(void)
{
  int n,num[n],min,max,sum;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[n],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
void minmax(int n,int num[n],int min,int max,int sum)
{
  int i=0;
  *min=1000000;
  *max=0;
  for(int j=0;j<n;j++){
    sum+=num[j];
  }
  while(i!=n){
    if(num[i]>max){
      max=num[i];
    }
    if(num[i]<min){
      min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:10:15: error: passing argument 2 of 'minmax' makes pointer from integer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |            ~~~^~~
      |               |
      |               int
main.c:2:23: note: expected 'int *' but argument is of type 'int'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                   ~~~~^~~~~~
main.c:10:19: error: passing argument 3 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                   ^~~~
      |                   |
      |                   int *
main.c:2:34: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                              ~~~~^~~
main.c:10:24: error: passing argument 4 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                        ^~~~
      |                        |
      |                        int *
main.c:2:42: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                                      ~~~~^~~
main.c: In function 'minmax':
main.c:17:3: error: invalid type argument of unary '*' (have 'int')
   17 |   *min=1000000;
      |   ^~~~
main.c:18:3: error: invalid type argument of unary '*' (have 'int')
   18 |   *max=0;
      |   ^~~~
Language: C

#include<stdio.h>
void minmax(int n,int num[n],int min,int max, int sum);
int main(void)
{
  int n,num[n],min,max,sum;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[n],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
void minmax(int n,int num[n],int min,int max,int sum)
{
  int i=0;
  int *min=1000000;
  int *max=0;
  for(int j=0;j<n;j++){
    sum+=num[j];
  }
  while(i!=n){
    if(num[i]>max){
      max=num[i];
    }
    if(num[i]<min){
      min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:10:15: error: passing argument 2 of 'minmax' makes pointer from integer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |            ~~~^~~
      |               |
      |               int
main.c:2:23: note: expected 'int *' but argument is of type 'int'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                   ~~~~^~~~~~
main.c:10:19: error: passing argument 3 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                   ^~~~
      |                   |
      |                   int *
main.c:2:34: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                              ~~~~^~~
main.c:10:24: error: passing argument 4 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[n],&min,&max,sum);
      |                        ^~~~
      |                        |
      |                        int *
main.c:2:42: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[n],int min,int max, int sum);
      |                                      ~~~~^~~
main.c: In function 'minmax':
main.c:17:8: error: 'min' redeclared as different kind of symbol
   17 |   int *min=1000000;
      |        ^~~
main.c:14:34: note: previous definition of 'min' with type 'int'
   14 | void minmax(int n,int num[n],int min,int max,int sum)
      |                              ~~~~^~~
main.c:18:8: error: 'max' redeclared as different kind of symbol
   18 |   int *max=0;
      |        ^~~
main.c:14:42: note: previous definition of 'max' with type 'int'
   14 | void minmax(int n,int num[n],int min,int max,int sum)
      |                                      ~~~~^~~
Language: C

#include<stdio.h>
void minmax(int n,int num[],int min,int max, int sum);
int main(void)
{
  int n,num[],min,max,sum;
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d",&num[i]);
  }
  minmax(n,num[],&min,&max,sum);
  printf("%d %d %d\n",min,max,sum);
  return 0;
}
void minmax(int n,int num[],int min,int max,int sum)
{
  int i=0;
  *min=0;
  *max=0;
  for(int j=0;j<n;j++){
    sum+=num[j];
  }
  while(i!=n){
    if(num[i]>max){
      max=num[i];
    }
    if(num[i]<min){
      min=num[i];
    }
    i++;
  }
}


Compiler output:
main.c: In function 'main':
main.c:5:9: error: array size missing in 'num'
    5 |   int n,num[],min,max,sum;
      |         ^~~
main.c:10:16: error: expected expression before ']' token
   10 |   minmax(n,num[],&min,&max,sum);
      |                ^
main.c:10:18: error: passing argument 3 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[],&min,&max,sum);
      |                  ^~~~
      |                  |
      |                  int *
main.c:2:33: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[],int min,int max, int sum);
      |                             ~~~~^~~
main.c:10:23: error: passing argument 4 of 'minmax' makes integer from pointer without a cast [-Wint-conversion]
   10 |   minmax(n,num[],&min,&max,sum);
      |                       ^~~~
      |                       |
      |                       int *
main.c:2:41: note: expected 'int' but argument is of type 'int *'
    2 | void minmax(int n,int num[],int min,int max, int sum);
      |                                     ~~~~^~~
main.c: In function 'minmax':
main.c:17:3: error: invalid type argument of unary '*' (have 'int')
   17 |   *min=0;
      |   ^~~~
main.c:18:3: error: invalid type argument of unary '*' (have 'int')
   18 |   *max=0;
      |   ^~~~