Here is the code:
char buchstabe;
int a;
int b;
printf("Folgende Wörter sind nutzbar:\n\nKälter\nWärmer\nSchulden");
printf("Bitte geben sie die 1. Zahl ein: ");
scanf("%d", &a);
printf("Bitte geben sie die 2. Zahl ein: ");
scanf("%d", &b);
printf("Bitte geben sie die ersten buchstaben (K, W, S) ein: ");
scanf(" %c", &buchstabe);
switch(buchstabe) {
case 'K':
case 'k':
printf("%d Celsius ist %d Celsius kälter.\nDadurch nehmen wir die Subtraktion." a, b, a-b);
break;
case 'W':
case 'w':
printf("%d Celsius ist %d Celsius wärmer.\nDadurch nehmen wir die Addition." a, b, a+b);
break;
case 'K':
case 'k':
printf("Mit Gehalt von %d muss Ich %d für die Schulden bezahlen" a, b, a-b);
break;
default:
printf("Invalid. Mehr wird in der Zukunft gemacht!");
}
}```
Ignore the German here. Basically this is a program which is supposed to take letters and make a sentence showing the user a calculation with word terms.
The Output is failure "Expected ')' before 'a".
Idrk what I am supposed to use Paranthesis for but please help me on this one.