A real easy one

Can someone tell me how to translate this BASIC statement into c# (There are no help topics in the c# express package about trig functions)

y = sin(x)

Also: Is there a translation tool that can help old BASIC programmers like me translate things from VB to VC# (My C is pretty wobbly)

Thanks and apologies for the noobieness.




Answer this question

A real easy one

  • Allen Jensen

    double y ;
    double x = Math.PI ; // Set x to 180 degrees in radians

    y = Math.Sin (x) ;

    Hope this helps :)

    ~Sean

  • TamNguyen

    Thanks.
  • A real easy one