Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int prevrten(int x, int cifra)
- {
- while(x)
- {
- cifra = x%10;
- x = x*10 +cifra;
- x/=10;
- }
- return x;
- }
- int main()
- {
- int x,cifra,i,n;
- scanf("%d", &n);
- for(i=0;i<n;i++)
- {
- scanf("%d%d", &cifra, &x);
- printf("%d", prevrten(cifra, x));
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment