0

why is it not working??

#include <stdio.h> #include <conio.h> void main() { int a,b,c ,x; printf("enter\n1 for addition\n2 for substraction"); scanf("d%" , &x); switch(x) { case 1 : printf("press any random key"); scanf("%d", &a ); printf("press another key"); scanf("%d" ,&b); c= a+b; printf("sum is %d ", c); break; case 2: printf("press any random key"); scanf("%d",&a); printf("press another key"); scanf("%d" , &b); c = a-b; printf("substraction is %d",c); break; default: printf("invalid"); } }

27th Jun 2019, 5:42 AM
Mizhan Adhikary
Mizhan Adhikary - avatar
2 Respostas
+ 4
scanf("%d", &x);
27th Jun 2019, 5:44 AM
Anna
Anna - avatar
+ 1
Thank you !!!!!😄😃
27th Jun 2019, 6:01 AM
Mizhan Adhikary
Mizhan Adhikary - avatar