0
Guys, i am trying to write a C program that checks the greater of two input numbers
#include<stdio.h> #include<conio.h> int main() { int a, b, big; printf("Enter any two number: "); scanf("%d%d", &a, &b); if(a>b) big=a; else big=b; printf("\nBiggest of the two number is: %d", big); getch(); return 0; }
3 ответов
+ 2
The conio.h header file is obsolete and does not come with mordern compilers. Also, you don't need it anywhere in your code. So just remove the line
`#include<conio.h>`
and also the line
`getch()`
because the getch function is found in conio.h
+ 2
you don't need getch() here. check this to see when to use it:
https://stackoverflow.com/questions/13677253/what-exactly-getch-does-in-c