Guest User

Untitled

a guest
Dec 7th, 2015
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.64 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdbool.h>
  3.  
  4. int main()
  5. {
  6.     char c, cc, b = NULL, e;
  7.     int k = 0, d;
  8.     while (1) {
  9.         c = getchar();
  10.         if (c == EOF) return 0;
  11.         k = 0;
  12.         while (c != ' ' || c != '\n') {
  13.             if (isdigit(c) == true && k != 0) b = c;
  14.             else {
  15.                 while (cc != ' ' || cc != '\n') {
  16.                     cc = getchar();
  17.                 }
  18.                 break;
  19.             }
  20.             printf("||");
  21.             c = getchar();
  22.             if (isdigit(c) == true) {
  23.                 if (b != NULL) putchar(b);
  24.             }
  25.             k = 1;
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment