Code -
/* Program to multiply two numbers in C++ */
//__ "\n" is used for new line and "\t" for a tab (spaces) ___
//__ cin is to take the input and cout is used to dispaly the output ___
#include<iostream>
//___ Header file in C++ where the standard input/output functions are defined ___
#include<conio.h>
using namespace std;
int main()
{
int first_number = 0, second_number = 0, multiply = 0;
cout << "\n\t\t __ Program to multiply two numbers in C++ ___";
cout << "\n\n Enter the First number - ";
cin >> first_number;
cout << "\n\n Enter the Second number - ";
cin >> second_number;
multiply = first_number * second_number;
cout << "\n\n\t\t ___ Multiplication of " << first_number << " and " << second_number << " is " << multiply << " ____";
getch();
return 0;
/*____ return 0 tells the compiler that program
has executed successfully without any error ____ */
}
No comments:
Post a Comment