Language: C

#include<stdio.h>
int main(){
	int i,a,b,c;
	int a1[100];
	int b1[100];
	int c1;
	scanf("%d %d %d",&a,&b,&c);
	int total=a*b;
	for(i=0;i<c;i++){
		scanf("%d %d %d",&a1[i],&b1[i],&c1);
		if(c1==1){
			total=total-(a[i]+a[i-1]+a[i-2])*b;
		}
		if(c1==2){
			total=total-(a-a1[i]+a[i-1]+a[i-2])*b;
		a=a1;
		}
			if(c1==3){
				total=total-b1[i]-b[i-1]-b[-2]*a;;
			}
			if(c1==4){
				total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
				}
				}
			printf("%d\n",total);
		}

Compiler output:
main.c: In function 'main':
main.c:12:39: error: subscripted value is neither array nor pointer nor vector
   12 |                         total=total-(a[i]+a[i-1]+a[i-2])*b;
      |                                       ^
main.c:12:44: error: subscripted value is neither array nor pointer nor vector
   12 |                         total=total-(a[i]+a[i-1]+a[i-2])*b;
      |                                            ^
main.c:12:51: error: subscripted value is neither array nor pointer nor vector
   12 |                         total=total-(a[i]+a[i-1]+a[i-2])*b;
      |                                                   ^
main.c:15:47: error: subscripted value is neither array nor pointer nor vector
   15 |                         total=total-(a-a1[i]+a[i-1]+a[i-2])*b;
      |                                               ^
main.c:15:54: error: subscripted value is neither array nor pointer nor vector
   15 |                         total=total-(a-a1[i]+a[i-1]+a[i-2])*b;
      |                                                      ^
main.c:16:18: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   16 |                 a=a1;
      |                  ^
main.c:19:52: error: subscripted value is neither array nor pointer nor vector
   19 |                                 total=total-b1[i]-b[i-1]-b[-2]*a;;
      |                                                    ^
main.c:19:59: error: subscripted value is neither array nor pointer nor vector
   19 |                                 total=total-b1[i]-b[i-1]-b[-2]*a;;
      |                                                           ^
main.c:22:55: error: subscripted value is neither array nor pointer nor vector
   22 |                                 total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
      |                                                       ^
main.c:22:62: error: subscripted value is neither array nor pointer nor vector
   22 |                                 total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
      |                                                              ^
main.c:22:66: error: expected ']' before '}' token
   22 |                                 total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
      |                                                                  ^
      |                                                                  ]
main.c:22:66: error: expected ')' before '}' token
   22 |                                 total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
      |                                             ~                    ^
      |                                                                  )
main.c:22:66: error: expected ';' before '}' token
   22 |                                 total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
      |                                                                  ^
      |                                                                  ;
main.c:22:67: error: expected statement before ')' token
   22 |                                 total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
      |                                                                   ^
main.c:22:68: error: invalid type argument of unary '*' (have 'int')
   22 |                                 total=total-(b-b1[i]-b[i-1]+b[i-2})*a;
      |                                                                    ^~
main.c: At top level:
main.c:25:32: error: expected declaration specifiers or '...' before string constant
   25 |                         printf("%d\n",total);
      |                                ^~~~~~
main.c:25:39: error: unknown type name 'total'
   25 |                         printf("%d\n",total);
      |                                       ^~~~~
main.c:26:17: error: expected identifier or '(' before '}' token
   26 |                 }
      |                 ^