Language: C

main() {
	if (int N = 1) {
		if (int K = 1) {
			if (int X = 1) {
				if (int Y = 1) {
					if (int ans = 0) {}
					else {
						if (scanf("%d", &N)) {}
						if (scanf("%d", &K)) {}
						if (scanf("%d", &X)) {}
						if (scanf("%d", &Y)) {}
						while (N > K) {
							if (ans += Y) {}
							if (N--) {}
						}
						while (N > 0) {
							if (ans += X) {}
							if (N--) {}
						}
						if (printf("%d", ans)) {}
					}
				}
			}
		}
	}
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main() {
      | ^~~~
main.c: In function 'main':
main.c:2:13: error: expected expression before 'int'
    2 |         if (int N = 1) {
      |             ^~~
main.c:3:21: error: expected expression before 'int'
    3 |                 if (int K = 1) {
      |                     ^~~
main.c:4:29: error: expected expression before 'int'
    4 |                         if (int X = 1) {
      |                             ^~~
main.c:5:37: error: expected expression before 'int'
    5 |                                 if (int Y = 1) {
      |                                     ^~~
main.c:6:45: error: expected expression before 'int'
    6 |                                         if (int ans = 0) {}
      |                                             ^~~
main.c:8:53: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |                                                 if (scanf("%d", &N)) {}
      |                                                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main() {
main.c:8:53: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |                                                 if (scanf("%d", &N)) {}
      |                                                     ^~~~~
main.c:8:53: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:66: error: 'N' undeclared (first use in this function)
    8 |                                                 if (scanf("%d", &N)) {}
      |                                                                  ^
main.c:8:66: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:53: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |                                                 if (scanf("%d", &K)) {}
      |                                                     ^~~~~
main.c:9:53: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:66: error: 'K' undeclared (first use in this function)
    9 |                                                 if (scanf("%d", &K)) {}
      |                                                                  ^
main.c:10:53: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |                                                 if (scanf("%d", &X)) {}
      |                                                     ^~~~~
main.c:10:53: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:66: error: 'X' undeclared (first use in this function)
   10 |                                                 if (scanf("%d", &X)) {}
      |                                                                  ^
main.c:11:53: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |                                                 if (scanf("%d", &Y)) {}
      |                                                     ^~~~~
main.c:11:53: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:11:66: error: 'Y' undeclared (first use in this function)
   11 |                                                 if (scanf("%d", &Y)) {}
      |                                                                  ^
main.c:13:61: error: 'ans' undeclared (first use in this function)
   13 |                                                         if (ans += Y) {}
      |                                                             ^~~
main.c:20:53: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |                                                 if (printf("%d", ans)) {}
      |                                                     ^~~~~~
main.c:20:53: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:53: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:53: note: include '<stdio.h>' or provide a declaration of 'printf'