Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void main(void)
- {
- int i,il;
- char tekst[100];
- puts("Podaj linie tekstu: ");
- gets(tekst);
- il=0;
- for(i=0; tekst[i]!=0; i=i+1)
- {
- if(tekst[i]>=48 && tekst[i]<=57)
- {
- il=il+1;
- }
- }
- puts("Ilosc liczb w tekscie: ");
- printf("%d",il);
- putchar('\n');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement