C++ program to multiply given two numbers

Views: 150   

Following program shows you how to multiply given two numbers.
In this program we get inputs from user and multiplies those two inputs

#include <iostream>

int main() {
    int input1;
    int input2;

    std::cout << "Enter first number:";
    std::cin >> input1;

    std::cout << "Enter second number:";
    std::cin >> input2;

    int result = input1 * input2;

    std::cout << "Multiplication of given two numbers is: " << result;


Enter first number: 30
Enter second number: 5
Multiplication of given two numbers is: 150
On By