How to write a program to multiply two numbers in C++ language
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c;
cout <<"Enter two numbers to multiply\n";
cin >> a >> b;
c=a*b;
cout <<"multiplication of the numbers = " << c << end1;
getch();
}
OUTPUT: -
Enter two numbers to multiply
8
5
Sum of the numbers = 40
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c;
cout <<"Enter two numbers to multiply\n";
cin >> a >> b;
c=a*b;
cout <<"multiplication of the numbers = " << c << end1;
getch();
}
OUTPUT: -
Enter two numbers to multiply
8
5
Sum of the numbers = 40


No comments:
Post a Comment