Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  hari
Language: C/C++
Code:
#include <stdio.h>
int main()
{
int i,a[100],n;
printf("Enter the size of array");
scanf("%d",&n);
printf("enter the array elements");
for(i=0;i<n;i++)
{
    scanf("%d",&a[i]);
    
}
for(i=n;i>=0;i--)
{
    if(a[i]%2!=0)
    {
        printf("%d",a[i]);
    }
        else
            {
            printf("%d",a[i-1]);
            
        }
    }
return 0;
}
          
          
Comments: