#include <stdio.h>
int main(void)
{
int c;
int space = 0;
while (c=getchar(), c!=EOF)
{
if (c==' ')
{
if (!space)
putchar(c);
space = 1;
}
else
{
space = 0;
putchar(c);
}
}
return 0;
}
No comments:
Post a Comment