Language: C

#include<stdio.h>
int blance(int N; int w[]){
  for(int T = 0; T<N; T++){
    for(int i =0;i <T; i++){
      int sum1 += w[i];
      int sum2 += w[i+1];
      int abs(sum1 -sum2);
    }
    for(int j = N-1; T<j; j--)
     int sum2 += w[j];    
    }
    int c[T] = abs(sum1 -sum2);
    int min = c[0];
    if(min> c[T]){
      min = c[T];
    }
    return min;
  }

int main(){
  int N;
  int w[] = {0};
  scanf("%d", &N);
  for(int i = 0; i <N; i++){
    scanf("%d", &w[i]);
  }
   blance(N,w);


  printf("%d",blance(N,w) );
  teturn 0;

}

Compiler output:
main.c:2:16: error: parameter 'N' has just a forward declaration
    2 | int blance(int N; int w[]){
      |            ~~~~^
main.c: In function 'blance':
main.c:3:20: error: 'N' undeclared (first use in this function)
    3 |   for(int T = 0; T<N; T++){
      |                    ^
main.c:3:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+=' token
    5 |       int sum1 += w[i];
      |                ^~
main.c:5:16: error: expected expression before '+=' token
main.c:6:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+=' token
    6 |       int sum2 += w[i+1];
      |                ^~
main.c:6:16: error: expected expression before '+=' token
main.c:7:19: error: expected ')' before '-' token
    7 |       int abs(sum1 -sum2);
      |                   ^~
      |                   )
main.c:10:6: error: expected expression before 'int'
   10 |      int sum2 += w[j];
      |      ^~~
main.c:12:11: error: 'T' undeclared (first use in this function)
   12 |     int c[T] = abs(sum1 -sum2);
      |           ^
main.c:12:16: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   12 |     int c[T] = abs(sum1 -sum2);
      |                ^~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | int blance(int N; int w[]){
main.c:12:20: error: 'sum1' undeclared (first use in this function)
   12 |     int c[T] = abs(sum1 -sum2);
      |                    ^~~~
main.c:12:26: error: 'sum2' undeclared (first use in this function)
   12 |     int c[T] = abs(sum1 -sum2);
      |                          ^~~~
main.c: In function 'main':
main.c:27:11: error: passing argument 1 of 'blance' makes pointer from integer without a cast [-Wint-conversion]
   27 |    blance(N,w);
      |           ^
      |           |
      |           int
main.c:2:23: note: expected 'int *' but argument is of type 'int'
    2 | int blance(int N; int w[]){
      |                   ~~~~^~~
main.c:27:4: error: too many arguments to function 'blance'
   27 |    blance(N,w);
      |    ^~~~~~
main.c:2:5: note: declared here
    2 | int blance(int N; int w[]){
      |     ^~~~~~
main.c:30:22: error: passing argument 1 of 'blance' makes pointer from integer without a cast [-Wint-conversion]
   30 |   printf("%d",blance(N,w) );
      |                      ^
      |                      |
      |                      int
main.c:2:23: note: expected 'int *' but argument is of type 'int'
    2 | int blance(int N; int w[]){
      |                   ~~~~^~~
main.c:30:15: error: too many arguments to function 'blance'
   30 |   printf("%d",blance(N,w) );
      |               ^~~~~~
main.c:2:5: note: declared here
    2 | int blance(int N; int w[]){
      |     ^~~~~~
main.c:31:3: error: 'teturn' undeclared (first use in this function)
   31 |   teturn 0;
      |   ^~~~~~
main.c:31:9: error: expected ';' before numeric constant
   31 |   teturn 0;
      |         ^~
      |         ;