Quote:
Originally Posted by rekha_sri View Post
Use the following program for printing the integer value unless press E or e. This example will help for your requirement.

Code:
#include<stdio.h>
#include<stdlib.h>
main()
{
long i;
char c;
for(i=0;i<=99999;i++)
{
printf("%d",i);
c=getchar();
if(c == 'e' || c == 'E')
{
        break;
}
continue;
}
}


with getchar you stop the execution of the program until the user press enter.
certainly not what he wants.

And no this is not a simple program.
There is not an easy way to do it(especially platform independent).