TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
tom jones
NA
18
11.1k
Problem with Math.Tan Function
Jul 20 2012 12:56 PM
[code]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Testing_Binary
{
class Program
{
static void Main(string[] args)
{
Double Radian = (Math.PI / 180);
Double count = 0;
int[] array = {1,0};
for (int i = 0; i < 2; i++)
{
if (array[i] == 1) count += Math.Tan(Radian);//POSITIVE COUNT = 0.0174550649282176
if (array[i] == 0) count += Math.Tan(-Radian);//NEGATIVE COUNT = -0.0174550649282176
}
//EXPECTING POSITVE AND NEGATIVE TO CANCELL EACH OTHER AND COUNT = 0, BUT GOT THE FOLLOWING:
Console.WriteLine("count = {0}", count);//I DON'T UNDERSTAND WHY = -4.06575814682064E-20
//I REALLY NEED TO UNDERSTAND WHAT HAPPEN. CAN SOMEONE PLEASE EXPLAIN?
}
}
}
[/code]
Reply
Answers (
4
)
access specifier public & internal
When we click on a .doc file Windows starts Word and loads that file. How can I similar loading in my programs with my file types?