Guest User

Untitled

a guest
Nov 25th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2. #define LEN 100
  3. #define SIZE 100
  4.  
  5. void main(void)
  6. {
  7. int i = 0, k = 0, j = 0, s[LEN], s1[LEN][SIZE];
  8. gets(s);
  9. while (s[k] != '') {
  10. if (s[k] != ' ')
  11. {
  12. s1[i][j] = s[k];
  13. k++;
  14. j++;
  15. }
  16. else {
  17. s1[i][j] = '';
  18. for (j = 0; s1[i][j] != ''; j++) {
  19. if (s1[i][j] == s1[i][j + 1]) {
  20. printf("%c", s1[i][j]);
  21. }
  22. }
  23. j = 0;
  24. i++;
  25. }
  26. }
  27. _getch();
  28. }
Add Comment
Please, Sign In to add comment