google.com, pub-8786015629279405, DIRECT, f08c47fec0942fa0 Write a program to illustrate Trigonometrical function

Write a program to illustrate Trigonometrical function

0


public class ashish
{
 public static void main (String args[])
 {
  double m=30;
  double n=60;
  double p=45;
  double x,y,z;
 
  //convert angle in radians
 
  x=(22.0/(7.0*180.0))*m;
  y=(22.0/(7.0*180.0))*n;
  z=(22.0/(7.0*180.0))*p;
 
  System.out.println("The Trigonometrical value are");
 
  System.out.println("The value of Sin 30 degree" +Math.sin(x));
 
  System.out.println("The value of Cos 60 degree" +Math.cos(y));
 
  System.out.println("The value of tan 45 degree" +Math.sin(z));
 
 }
}

Expected Output is :

The Trigonometrical value are
The value of Sin 30 degree0.5001825021996698
The value of Cos 60 degree0.4996349289865546

The value of tan 45 degree0.7073302780849811


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Thank you for your interest 😊

We will back shortly after reviewing...

Thank you for your interest 😊

We will back shortly after reviewing...

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top