/programy/C/pismena/pismena.c |
---|
11,13 → 11,19 |
int znaky = 0; |
char c; |
*mala=*velka=*cisla=0; |
while ((c=getchar()) != '\n') |
{ |
znaky++; |
if('a'< c <'z') *mala++; |
if('A'< c <'Z') *velka++; |
if('0'< c <'9') *cisla++; |
// if('a'< c <'z') (*mala)++; |
// if('A'< c <'Z') (*velka)++; |
// if('0'< c <'9') (*cisla)++; |
if (isdigit(c)) (*cisla)++; |
if (islower(c)) (*mala)++; |
if (isupper(c)) (*velka)++; |
} |
return znaky; |
/programy/C/pismena/pismena.exe |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programy/C/pole/pole.c |
---|
0,0 → 1,36 |
///////////////////////////////////////////////////////////////// |
// Program spocita pocet malych, velkych pismen a cislic v napsane radce. |
///////////////////////////////////////////////////////////////// |
#include <stdlib.h> |
#include <stdio.h> |
int napln_pole(int* adresa,int* velikost) |
{ |
int i; |
for(i=0; i<velikost;i++) adresa[i]=i; |
} |
int vypis_pole(int* adresa,int* velikost) |
{ |
int i; |
for(i=0; i<velikost;i++) printf("%d",adresa[i]); |
} |
int main() |
{ |
int *pole; |
int velikost; |
printf("Zadejte velikost pole:"); |
scanf("%d", &velikost); |
pole=(int*)malloc( sizeof(int) * velikost); |
if (pole=NULL) printf("pamet nebyla pridelena"); |
napln_pole(&pole,velikost); |
vypis_pole(&pole,velikost); |
free (pole); |
} |
/programy/C/pole/pole.exe |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |