C++ cin Read double type value from command line
#include <iostream> using namespace std; int main()/*from w w w . ja va 2 s. c o m*/ { double num1, num2, product; cout << "Please type in a number: "; cin >> num1; cout << "Please type in another number: "; cin >> num2; product = num1 * num2; cout << num1 << " times " << num2 << " is " << product << endl; return 0; }