diff --git a/1-13.c b/1-13.c new file mode 100644 index 0000000..2f002d0 --- /dev/null +++ b/1-13.c @@ -0,0 +1,44 @@ +#include + +// version 1.0 +#define ARR_LENGTH 20 +int main(){ + int arr[ARR_LENGTH]; + int c, index, i, dashes, nc; + index = i = dashes = nc = 0; + while ((c = getchar()) != '\n' && i < ARR_LENGTH-1){ + if (c == ' ' && nc != 0){ + arr[index]=nc; + nc=0; + index++; + } + else { + nc++; + } + } + while (i < index){ + while (dashes