Question #186794

Declare two variables a and b to store values 2.1 and 6.4. Declare another variable c and assign it the result of a * b.


Expert's answer

#include <iostream>
using namespace std;

int main()
{
    double a = 2.1;
    double b = 6.4;
    double c = a * b;

    cout << a << " * " << b << " = " << c << endl;
}
LATEST TUTORIALS
APPROVED BY CLIENTS