Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char mivan=0,c;
- int szam,t;
- while((c=getchar())!='\n')
- {
- if(!mivan)
- {
- if(c>='0'&&c<='9')
- {
- mivan=1;
- szam=c-'0';
- }
- else
- {
- printf("%c", c);
- }
- }
- else
- {
- if(c>='0'&&c<='9')
- {
- szam=szam*10+c-'0';
- }
- else
- {
- printf("0x%X%c", szam, c);
- mivan=0;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement