Question:

Solution technique:

1. take inputs

2. define pi as acos(-1.0)

3. use the formula below to find the output:

area = (n*r*r*(sin(2.0*pi/n)))/2;

Question:

Solution technique:

1. take inputs

2. define pi as acos(-1.0)

3. use the formula below to find the output:

area = (n*r*r*(sin(2.0*pi/n)))/2;

Labels:
UVA Problems Code

Question:

Solution:

1. take inputs c, n, and the numbers in an array a[]

2. add all the elements of the array and find the average.

3. now check for the following condition and print the result:

int main(){

....

.....

for(j=0; j>n; j++){

if(a[j]<avg)count++;

}

r = (count/n)*100;

printf("%.3lf%c\n", r, d);

}
Labels:
UVA Problems Code

Subscribe to:
Posts (Atom)