how to close app including console


How can i close completly (the app + the console) an app, if i hit X button or press ESC the main window close but i even have the console window…

Its there any way of clossing (the app + the console) ?

I would also like to know why not cobeblocks.
Visual studio is also closed.