Read two int number b, c, and assign the product of variables b and c to variable a. - C++ Operator

C++ examples for Operator:Arithmetic Operator

Description

Read two int number b, c, and assign the product of variables b and c to variable a.

Demo Code

#include <iostream>

int main(int argc, const char *argv[]) {
    int a, b, c;//w  w  w  .  ja v a  2  s  .c  om

    std::cout << "Enter two numbers ";
    std::cin >> b >> c;

    a = b * c;

    std::cout << "This program performs a calculation" << std::endl;
    std::cout << "Enter three integer values ";

    std::cin >> a >> b >> c;

    return 0;
}

Result


Related Tutorials