Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #include<stdio.h>
- 2 int main()
- 3 {
- 4 int spase = 0;
- 5 int tab = 0;
- 6 int string = 0;
- 7 int c;
- 8 while ((c = getchar()) != EOF)
- 9 {
- 10 if (c == 32)
- 11 ++spase;
- 12 if (c == '\t')
- 13 ++tab;
- 14 if (c == '\n')
- 15 ++string;
- 16 printf ("%d\n", c);
- 17 }
- 18 printf ("%d\n", spase);
- 19 printf ("%d\n", tab);
- 20 printf ("%d\n", string);
- 21 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement