You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
327 B
24 lines
327 B
8 months ago
|
#include <stdio.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
int c;
|
||
|
int ws = 0;
|
||
|
|
||
|
while ((c = getchar()) != EOF)
|
||
|
{
|
||
|
if (c == ' ')
|
||
|
{
|
||
|
++ws;
|
||
|
if (ws < 2)
|
||
|
printf("%c", c);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("%c", c);
|
||
|
ws = 0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|