Compare commits
2 Commits
dcf8e054b1
...
9f3cb06f00
Author | SHA1 | Date | |
---|---|---|---|
9f3cb06f00 | |||
85f4f8d165 |
BIN
du1/program
BIN
du1/program
Binary file not shown.
@ -1,31 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
|
||||
int main(){
|
||||
int c= 0;
|
||||
int n=0; // pocet nacitanych znakov
|
||||
while(1){
|
||||
c = getchar();
|
||||
|
||||
if(c!=-1){ //-1 eof koniec vstupu
|
||||
if( c >= 'a' && c <= 'z'){ //porovnavam cisla v ascii tabulke
|
||||
c=c+'A'-'a'; //velke pismeno na male
|
||||
}
|
||||
else if(c >= 'A' && c <= 'Z'){
|
||||
c=c-'A'+'a'; //male pismeno na velke
|
||||
}
|
||||
}
|
||||
else{
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
putchar(c);
|
||||
|
||||
|
||||
}
|
||||
printf("\n");
|
||||
printf("Pocet riadkov: %d\n", n); //vypise pocet zpouzitych znakov
|
||||
return 0;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user