C++ program to multiply two numbers without using multiplication operator

Write a c++ program to multiply two numbers without using multiplication operator.

#include<iostream.h>
#include<conio.h>
void main ()
{
int a,b,i,temp=0;
clrscr();
cout<<"Enter Two numbers for multiplication";
cin>>a>>b;
for(i=1;i<=b;i++)
{
temp=temp+a;
}
cout<<endl<<"Result are:: "<<temp;
getch();
}

21 Responses to “C++ program to multiply two numbers without using multiplication operator”

Leave a Reply