C++ double type assignment and math calculation

Description

C++ double type assignment and math calculation

#include <iostream>
using namespace std;
int main()// w ww  .jav  a2 s  . com
{
   double num1, num2, product;
   num1 = 30.0;
   num2 = 0.05;
   product = num1 * num2;
   cout << "30.0 times 0.05 is " << product << endl;
   return 0;
}



PreviousNext

Related