Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Termination Upon Esc

Name: Anonymous 2008-04-15 21:30

#include "iostream"
#include "conio.h"
using namespace std;
void main ()
{
    signed int a=0;
    do
    {
        a++;
        cout<<a<<endl;

    }
    while (a>-1);
    getch();
}

I want this loop program to terminate upon pressing esc key. How do I do that /prog/? Halp me pls.

Name: Anonymous 2008-04-15 23:51

>>10
He's right, it's NP complete

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List