Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char haupt_str[10][10];
- char str[100];
- int save_size[10];
- printf("Enter your string \n");
- gets_s(str, 100);
- int len = strlen(str);
- int queue = 0;
- int size = 0;
- for (int j = 0; j < len; j++)
- {
- if ((str[j] != ' ') || (str[j] !='.') || (str[j] != ','))
- {
- haupt_str[queue][size] = str[j];
- size++;
- }
- else
- {
- save_size[queue] = size;
- size = 0;
- queue++;//кількість елементів
- }
- }
- for (int i = 0; i < queue; i++)
- {
- for(int j = 0; j < save_size[queue]; j++)
- {
- printf("%c", haupt_str[queue][save_size[queue]]);
- }
- printf("\n");
- }
- getchar();
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement