/* This is a program intended to copy its input to its output, replacing
each string of one or more blanks by a single blank.
My question is that how can I terminate the program in VC instead of running
it without stop?*/
#include <stdio.h>
#define NONBLANK 'a'
void main (void)
{
char i=getchar();
int lastc=NONBLANK;
while (i!=EOF){
if (i!=' ')
putchar(i);
if (i==' ')
if (lastc!=' ')
putchar(i);
lastc=i;
}
}