All Data For Free
Pages
Home
Watch Full WWE Episodes of Raw and Smackdown
Contact Us
Copyright Policy
Saturday, 10 December 2011
Write a program convert float to int in c
#include
#include
main()
{
float x,y,z;
clrscr();
x=10.898;
y=21.777;
z=x+y;
printf("\n %f",z);
z=(int)x+y;
printf("\n %f",z);
z=(int)(x+y);
printf("\n %f",z);
getch();
}
OUTPUT
32.674999
31.777000
32.000000
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment