Saturday, March 18, 2017

URI problem 1172 solution in C | (Array Replacement I)

Please visit this link to find the solutions-

Link:https://codespathshala.com/uri-1172/



/

1 comment:

  1. #include
    int main()
    {
    int i;
    float a[10];
    for(i=0;i<10;i++)
    {
    scanf("%f",&a[i]);
    }
    for(i=0;i<10;i++)
    {
    if(a[i]<=0)
    {
    a[i]=1;
    printf("X[%d] = %.0f\n",i,a[i]);
    }
    else
    printf("X[%d] = %.0f\n",i,a[i]);

    }
    return 0;
    }
    reply..

    ReplyDelete