Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- char tab[1000]={0};
- int x;
- int i;
- int y;
- void tekst(char tab[])
- {
- int i=0;
- y=0;
- printf("Wpisz dowolny tekst: \n");
- do
- {
- x=getchar();
- tab[i]=x;
- i++;
- y++;
- } while(x!=10 && i<1000);
- }
- int znak(char tab[])
- {
- unsigned int a=0;
- int i;
- for(i=0;i<=y;i++)
- {
- if(tab[i]==97) a++;
- if(tab[i]==10) return a;
- }}
- int main()
- {
- int x,y;
- tekst(char tab[]);
- x=znak(char tab[]);
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement