Heres den Code auszuführen:Im einen Rechner in c tun und Fehler Pop-up, wenn ich versuche, es
#include <stdio.h>
#include <stdlib.h>
void main() {
int op,a,b;
printf("***Welcome to the calculatron***\n\n");
do{
printf("choose an operation\n\n");
print(" 1 : Addition\n 2: Substraction\n 3: Multiplication\n 4: Division");
scanf("%d",&op)
}while((op != 1 && (op != 2) && (op != 3) && (op != 4));
printf("Type the first number");
scanf("%d",&op)
printf("Type the second number");
scanf("%d",&op);
switch(op)
case 1:
printf("You have chosen the Addition\n");
printf("%d + %d = %d",a,b,a+b);
break;
case 2:
printf("You have chosen the Substraction\n");
printf("%d + %d = %d",a,b,a-b);
break;
case 3:
printf("You have chosen the Multiplication\n");
printf("%d + %d = %d",a,b,a*b);
break;
case 4:
printf("You have chosen the Division\n");
printf("%d + %d = %d",a,b,a/b);
break;
}
Der Fehler
expected " ; " before " } " token and expected ") " before " ; " token are in lines 13 and 41
Ich weiß nicht, was zu tun ist bitte hilfe.
das umfasst die folgenden sind: #include #include –
'void main()' ist eine ungültige Signatur, Aufrufen UB. – Olaf
Zwei der 'scanf' Aufrufe werden ohne abschließende'; 'geschrieben ... –