2nd Jun 2023, 4:30 PM
Nibir Nath
Nibir Nath - avatar
2 Respostas
+ 7
Where are you running or trying this code? canio.h is deprecated, non-standard header file. Don't use , remove it. So getch() don't work. Instead try getchar().. Put comma, between statements to separate them. Other wise, that is single and invalid statement like you put scanf(...) Correct way is : scanf("%d%d", &a, &b); put return type of main as int like int main() { ... }
2nd Jun 2023, 4:36 PM
Jayakrishna 🇮🇳
+ 4
There's still an extra % in your scanf, should just be %d%d Also it wouldn't hurt to remove that orphan getchar() at the bottom, and to add \n to the end of both outputs, just to clean things up a bit
2nd Jun 2023, 5:38 PM
Orin Cook
Orin Cook - avatar