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

by Nideesh C on April 14, 2011 · 0 comments

in C++




#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();
}



Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. C++ program to multiply two polynomials maintained as linked lists
  2. C++ program – Perform complex arithmetic using operator overloading
  3. C++ program using class – To multiply by 10 to every member of a list
  4. C program to read in four integer numbers into an array and find the average of largest two of the given numbers without sorting the array. The program should output the given four numbers and the average with suitable headings.
  5. C program to generate and print prime numbers in a given range. Also print the number of prime numbers

Leave a Comment

Previous post:

Next post: