diff --git a/du1/.program.c.swp b/du1/.program.c.swp new file mode 100644 index 0000000..a8c8676 Binary files /dev/null and b/du1/.program.c.swp differ diff --git a/du1/program b/du1/program new file mode 100755 index 0000000..3b373e3 Binary files /dev/null and b/du1/program differ diff --git a/du1/program.c b/du1/program.c index 53c5fdf..1e4e824 100644 --- a/du1/program.c +++ b/du1/program.c @@ -1 +1,22 @@ #include + +int main(){ + int C = 0; + char Big_Wort; + int count = 0; + while(1){ + C = getchar(); + if(C == EOF) + break; + if(C == '\n') + count++; + if(C >= 'a' && C <= 'z') + C = C - 'a' + 'A'; + else if(C >= 'A' && C <= 'Z') + C = C - 'A' + 'a'; + Big_Wort = C; + putchar(Big_Wort); + } + printf("\nCount of lines: %d\n",count); + return 0; +}