Posted by adioe3 on Wed 7th Feb 06:05
download | new post
- #include <stdio.h>
- int main(){
- int c,i=0;
- while((c=getchar() != EOF){
- if(c==' '){
- ++i;
- if(i==1){
- putchar(' ');
- } else { i=1; }
- } else {
- putchar(c); i=0;
- }
- }
- return 0;
- }
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.