#include<iostream.h>
int main( )
{
// casts a double value as an int
double v = 1234.56789;
int n = int (v);
cout << " v = " << v <<", n = " << n ;
return 0;
}
Labels: C++ Basic Codes, C++ Codes
Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies| |
---|
0 comments:
Post a Comment