Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int a[500],b[500];
- int n,count=0,count1=0,count3=0;
- scanf("%d",&n);
- while(n){
- a[count++]=n%10;
- n/=10;
- }
- b[count1++]=a[0];
- for(int i=count-2;i>0;i--){
- b[count1++]=a[i];
- }
- b[count1++]=a[count-1];
- for(int i=0;i<count1;i++){
- if(b[i]==0) count3++;
- else break;
- }
- for(int i=count3;i<count1;i++){
- printf("%d",b[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement