Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  qwerty.c
Language: C/C++
Code:
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<process.h>
int main()
{
    int i,j,k=0,m,a[10];
    char s1[20],s2[20];

    printf("enter the string :");
    scanf("%s",s1);
    m=strlen(s1);
    for(i=0;s1[i]!='0';i++)
    {
        if(isdigit(s1[i]))
        {
            s2[i]=s1[i];
            a[j]=i;
            j++;
            
        }
    }
    for(i=0;i<m;i++)
    {
        if(i!=a[k])
        {
            s2[i]=s1[m-1];
            k++;
            m--;
        }
       else
       m++;
    
    }
   printf("%s",s2);
return 0;
}          
          
          
          
          
          
Comments: