C++ examples for Data Type:int
Calculate the product of three integers
#include <iostream> using namespace std; int main() {//from w w w. j av a 2s . c o m int x{0}; // first integer to multiply int y{0}; // second integer to multiply int z{0}; // third integer to multiply int result{0}; // 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 }