Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char mus[100];
- int i = 0, k = 0;
- printf("Введите строку\n");
- gets_s(mus);
- while (mus[i] != '\0'){
- if (mus[i] == ' ' && mus[i+1] != ' ')
- k++;
- i++;
- }
- printf("%d\n", k+1);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement