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.
#include <iostream>
using namespace std;
int main()
{
double a = 2.1;
double b = 6.4;
double c = a * b;
cout << a << " * " << b << " = " << c << endl;
}
Comments
Leave a comment