Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- void main()
- {
- char text[20];
- int i=0,n=1;
- char opd[20];
- int j=-1;
- printf("\n Vvedite arifm-oe viragenie.\n");
- gets(text);
- while(text[i]!=' ')
- {
- if(text[i]>='a' && text[i]<='z')
- opd[++j]=text[i];
- else
- {
- printf("\n R%d:=",n);
- if(opd[j-1]>='1' && opd[j-1]<='9')
- printf("R");
- printf("%c%c",opd[j-1],text[i]);
- if(opd[j]>='1' && opd[j]<='9')
- printf("R");
- printf("%c",opd[j]);
- opd[j-1]=n+'0';
- j=j-1;
- n++;
- }
- i++;
- }
- getch();
- }
Add Comment
Please, Sign In to add comment