Language: C

main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
	r=a*A+b*B+c*C;
	if(C=>d){
		if(r>a*A+b*B+e*C)r=a*A+b*B+e*C;
	}else{
		if(r>a*A+b*B+e*d)r=a*A+b*B+e*C;
		if(B+C>=d){
			if(T=d-C,r>a*A+b*(B-T)+e*d)r=a*A+b*(B-T)+e*d;
		}else if(A+B+C>=d){
			if(T=d-B-C,r>a*(A-T)+e*d)r=a*(A-T)+e*d;
		}else{
			if(r>e*d)r=e*d;
		}
	}
}exit(0);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'r' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'T' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'c' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'd' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'e' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'A' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'B' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'C' defaults to 'int' [-Wimplicit-int]
main.c:1:32: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
      |                                ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
main.c:1:32: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
      |                                ^~~~~
main.c:1:32: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:82: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
      |                                                                                  ^~~~~~
main.c:1:82: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:82: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:82: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:14: error: expected expression before '>' token
    3 |         if(C=>d){
      |              ^
main.c:15:2: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   15 | }exit(0);}
      |  ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | main(r,T,a,b,c,d,e,A,B,C){for(;scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&e,&A,&B,&C);printf("%d\n",r)){
main.c:15:2: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   15 | }exit(0);}
      |  ^~~~
main.c:15:2: note: include '<stdlib.h>' or provide a declaration of 'exit'