Data Structures, Algorithms and Programming.
Wednesday, December 3, 2008
Compute the number of digit after . in floating point number.
if given 9.554 output=3
for 43.000 output=0
double no =3.44;
int count =0;
while(no!=((int)no))
{
count++;
no=no*10;
}
printf("%d",count);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
About Me
OpenNickle
View my complete profile
Category
A Warm Welcome
Algorithm
Arrays
Binary Tree
C++
Constructor
Double Linked List
FAQ
Inspiration
Material
numeric
Operators
Others
Queue
Single Linked List
Stack
String Manipulation
Blog Archive
►
2009
(4)
►
February
(1)
►
January
(3)
▼
2008
(33)
▼
December
(8)
Find if a tree is balanced
Insert and Delete operations on Double Linked List
Angle between hour arm and minute arm in an analog...
Replace all occurance of %20 with a blank space.
Compute the number of digit after . in floating po...
Breadth first traversal in binary tree
Non recursive insert operation in binary tree.
Find the next biggest number from the digits in th...
►
November
(5)
►
October
(4)
►
September
(1)
►
August
(1)
►
July
(3)
►
January
(11)
►
2007
(1)
►
December
(1)
No comments:
Post a Comment