Saturday 25 July 2015

FENCE1

Build a Fence

Link to the question : FENCE1 

HINT : 

Imagine a very long straight ruler and a piece of smallish rope. The rope is tied to the ruler at one end and loose at the other. Now connect the other end of the rope to the ruler and you'd get a shape with a straight bottom (made of the ruler itself) and a curvy top (made by the rope). This shape has an area, what is its maximum area given the length of the rope?

RECOMMENDED QUESTION:

Try your hands in this question after getting an AC in this.

SOURCE CODE :

#include<stdio.h>

int main()
{
    int l,x=1;
    double s;
    while(x!=0)
    {
        scanf("%d",&l);
        x=l;
        if(x!=0)
        {
            s= (float)(l*l/(2*3.1415926 ));
            printf("%.2f\n",s);
        }
    }



    return 0;
}

1 comment:

  1. Aquilina Soriano, Maxima Guerra, Felipe Guerra, Rosario Furto and Redentor Ilagan sued JG Summit Petrochemical Corp. (JGSPC) and its contractors and affiliates to stop them from building perimeter fence around the plant and company compound in Batangas City.aluminum privacy fence

    ReplyDelete