Demonstrate Math.Sin(), Math.Cos(), and Math.Tan(). : Math : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Math »

 

Demonstrate Math.Sin(), Math.Cos(), and Math.Tan().









    

/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/
//  Demonstrate Math.Sin(), Math.Cos(), and Math.Tan(). 
 
using System; 
 
public class Trigonometry {    
  public static void Main() {    
    Double theta; // angle in radians 
     
    for(theta = 0.1; theta <= 1.0; theta = theta + 0.1) { 
      Console.WriteLine("Sine of " + theta + "  is " + 
                        Math.Sin(theta)); 
      Console.WriteLine("Cosine of " + theta + "  is " + 
                        Math.Cos(theta)); 
      Console.WriteLine("Tangent of " + theta + "  is " + 
                        Math.Tan(theta)); 
      Console.WriteLine(); 
    } 
 
  }    
}

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Math