why does my programs close as soon it opens? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

why does my programs close as soon it opens?

I have return 0, but it just closes idk why

17th Jul 2016, 5:13 PM
Izzy Stone
Izzy Stone - avatar
2 ответов
+ 2
because program that you executes it runs and process terminates all its done in millisecs . you can use getch () function for seeing the output however it is used to take character as input but you may also use it for seeing results.
17th Jul 2016, 5:55 PM
Tushar Chetan
Tushar Chetan - avatar
+ 1
or use system pause funtion at the end of ur program
17th Jul 2016, 6:16 PM
Suhail Pappu
Suhail Pappu - avatar