Advertisement
palmerstone

Untitled

Jun 5th, 2011
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. char str[10000000][140];
  2. char str2[10000000];
  3. int main()
  4. {
  5. char ch, dum;
  6. int t, i, j, k, l, a, b, c, d, x, y, z, m, n, p, len, i1, ss, tt;
  7. for (ss = 1; ;ss++)
  8. {
  9. i1 = 0;
  10. for (tt = 1; ;tt++)
  11. {
  12. gets(str2);
  13. if (feof(stdin))
  14. break;
  15. if (str2[0] == '\0' && tt != 1)
  16. break;
  17. len = strlen(str2);
  18. strcpy(str[i1], str2);
  19. str[i1][len] = '\0';
  20. i1++;
  21. }
  22. if (feof(stdin))
  23. break;
  24.  
  25. for (i = 0; i < i1; i++)
  26. {
  27. z = 0;
  28. for (j = 0; str[i][j] != '\0';)
  29. {
  30. z = 0;
  31. if (str[i][j] >= 48 && str[i][j] <= 57)
  32. {
  33. z = 0;
  34. for (k = j; ;k++)
  35. {
  36. if (str[i][k] == '\0')
  37. break;
  38. if (str[i][k] < 48 || str[i][k] > 57)
  39. break;
  40. x = str[i][k] - 48;
  41. z = z + x;
  42. }
  43. for (p = 1; p <= z; p++)
  44. {
  45. if (str[i][k] == '\0')
  46. break;
  47. if (str[i][k] == 'b')
  48. {
  49. printf(" ");
  50. }
  51. else
  52. {
  53. printf("%c", str[i][k]);
  54. }
  55. }
  56. j = k;
  57. }
  58. else
  59. {
  60. if (str[i][j] == '!')
  61. {
  62. printf("\n");
  63. }
  64. j++;
  65. }
  66. }
  67. printf("\n");
  68. }
  69. }
  70. return 0;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement