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
nail
NA
8
0
convert float to int
Mar 22 2009 6:01 PM
hi everyone,
i want to convert a floating point number to an IEEE32 bit standart. first, i tried to split the float number.
here is the code;
float number = float.Parse(Console.ReadLine());
int a = (int)number;
float b= number - a;
Console.WriteLine(a);
Console.WriteLine(b);
but there is a problem, for example i tried to split 12,6 but it splits the number 12 and 0,60000004
how can i fix this problem?
thanks
Reply
Answers (
5
)
Very simple question
Best parctise to expose jagged arrays to COM