Sin eats my head

Geometry Level 4

If the product of (sin 1°)(sin 3°)(sin 5°)..............(sin 89°)= 1 2 n \frac{1}{2^{n}} find the value of n

22.5 44 45 44.5

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Deep Joshi
Aug 5, 2015

public class HelloWorld{

 public static void main(String []args){
     Double d = 1.0;
     for(int i=1;i<90;i+=2) {
         d = d* Math.sin((double)(i*Math.PI/180));
     }
     d = 1/d;
     d =  Math.log(d) / Math.log(2);
    System.out.println("answer = "+d);
 }

}

The answer should be 44.5. Please review your code.

Calvin Lin Staff - 5 years, 8 months ago

Log in to reply

Ya I was mistaken the answer should be 44.5

harsh poddar - 5 years, 8 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...