+ 1
i am not getting the results. why?
#include <stdio.h> #include <conio.h> void main() { int a,b,sum; printf ("Enter first number:"); scanf ("%d",&a); printf ("Enter second number:"); scanf ("%d",&b); sum=a+b; printf ("summation=%d",sum); getch(); }
2 Answers
+ 4
well I guess you tried this on sololearn code playground or any modern IDE and If you did so , then there is no chance that it's gonna work.
First thing <conio.h> is no more supported and that means you can't use any of it's functions too so using void main and getch() is useless. Just edit it and little bit , remove that #include<conio.h> , replace void main() by int main() and getch(); by return 0; it'll work successfully .
+ 1
thanks a lot.....