C++ examples for Operator:Arithmetic Operator
Calculate the product of three integers
#include <iostream> using namespace std; int main() //from w ww .jav a2 s . c o m { int x; // first integer to multiply int y; // second integer to multiply int z; // third integer to multiply int result; // the product of the three integers cout << "Enter three integers: "; // prompt user for data cin >> x >> y >> z; // read three integers from user result = x * y * z; // multiply the three integers; store result cout << "The product is " << result << endl; // print result; end line return 0; }