C++ examples for Data Type:double
Double type assignment and math calculation
#include <iostream> using namespace std; int main()/* w w w . ja v a 2 s .co m*/ { double num1, num2, product; num1 = 30.0; num2 = 0.05; product = num1 * num2; cout << "30.0 times 0.05 is " << product << endl; return 0; }