C++ program to multiply two numbers without using multiplication operator
by Ranjith | April 4th, 2010.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(); }
Share and Enjoy:




















August 25th, 2010 at 10:50 pm
It will not work
1.If a is -ve
2.b is -ve