Guest User

Untitled

a guest
Jul 15th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. void main()
  4. {
  5. char text[20];
  6. int i=0,n=1;
  7. char opd[20];
  8. int j=-1;
  9. printf("\n Vvedite arifm-oe viragenie.\n");
  10. gets(text);
  11. while(text[i]!=' ')
  12. {
  13. if(text[i]>='a' && text[i]<='z')
  14. opd[++j]=text[i];
  15. else
  16. {
  17. printf("\n R%d:=",n);
  18. if(opd[j-1]>='1' && opd[j-1]<='9')
  19. printf("R");
  20. printf("%c%c",opd[j-1],text[i]);
  21. if(opd[j]>='1' && opd[j]<='9')
  22. printf("R");
  23. printf("%c",opd[j]);
  24. opd[j-1]=n+'0';
  25. j=j-1;
  26. n++;
  27. }
  28. i++;
  29. }
  30. getch();
  31. }
Add Comment
Please, Sign In to add comment