Wednesday, September 26, 2018

Solution of URI 1178::Array Fill III

Before seeing the solution make sure that you have tried enough. Don’t copy the whole code, just find out the logic. If you feel any problemyou will inform me by comment.




#include <stdio.h>
int main(){
    double X;
    int p;

    scanf("%lf",&X);
    for(p=0;p<100;p++){
        printf("N[%d] = %.4lf\n",p,X);
        X = X/2;
    }
    return 0;
}

No comments:

Post a Comment