include stdio int main int trigger while getchar EOF if putchar trigge

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
int main()
{
int c, trigger = 0;
while((c = getchar()) != EOF)
{
if(c!=' ')
{
putchar(c);
trigger=0;
}
if(c==' ')
{
if(trigger==0)
{
putchar(c);
trigger=1;
}
}
}
return 0;
}