fork(1) download
  1. #include <stdio.h>
  2. int main(void)
  3. { int c,i,b,n,min=1;
  4. int a[50]={0};
  5. while((c!=10))
  6. { if(c==32)c=0;
  7. else
  8. { i=0 ; while (c!=32&&c!=10)
  9. { a[i++]=c; c=getchar () ; }
  10.  
  11. if(i<15 ){
  12. for(b=0;b<i;b++)
  13. printf ("%c-%d\n", a[b],b);
  14. printf ( " ") ;
  15. }}}
  16. }
  17.  
Success #stdin #stdout 0.01s 5420KB
stdin
VVV BBBB G HH
stdout
-0
V-1
V-2
V-3
 -0
B-1
B-2
B-3
B-4
 -0
G-1
 -0
H-1
H-2