Code:
#include<stdio.h>
#include<math.h>

cuberoot(float a)     /*A function to find the root*/
{
    float n;
    n = pow(a,(1/3));
    return n;
}

main()
{
    float input_array[20],output_array[20];
    int i;
    
    printf("Give values to the array : \n");    /*Two array are created with 20 elements*/
    
    for(i=0;i<20;i++)
    {
        scanf("%d",&input_array[i]);        /*Their input is taken*/ 
        
        if(input_array[i] == 0)
        {
            break; 
        }
    }
    
    for(i=0;i<20;i++)
    {
        if(i % 2 == 0)
        {
            output_array[i] =  2 * input_array[i];    /*The contents of the array are converted. If the subscript of the element is even then it is doubled*/
        }
        
        else
        {
            output_array[i] = cuberoot(input_array[i]) ;    /*Orelse it's cube root is found*/
        }  
    }
    
    printf("Input Array\tOutput Array\n");
    
    for(i=0;i<20;i++)
    {                                   
        printf("%f\t%f\n",input_array[i],output_array[i]);            /*The contents of the array are printed here */
    }
}
But the program is printing all the elements as 0