**Problem:-**Write a C++ program to find multiplication of two number without using Asterisk ( * ) Symbol.

**Logic:-**There are two methods we can use for solving this problem, this is a very important question for interview purpose because we never think about how we can multiply two number without using Asterisk Sign( * ), we just take two value and use the Asterisk Sign( * ) and put between two variables. We will take an example and through an example, we can try to solve the problem and find out the number of the way we can solve the problem.

For solving a mathematical equation there is a

**VEDIC Math**( Old Indian Math ), By the help of

**VEDIC Math**, we can solve large equation is second for an example if you want to check a Number is divisible by 11 or not How you can check in a second and remember number may be very large. For an example, we take a number 161051 is divisible by 11 or not. you can check the demo of VEDIC math, C Program To Check Number Is Divisible By 11 Or Not Using (

**VEDIC MATH**).

Now come to the problem there is two way, So let's take an example suppose we want to multiply 20 and 10 there are two methods you can follow.

**Method 1:- Traditional**

You can direct multiple 20 * 10 = 200 this is a very famous Traditional way for calculating or solving multiplication but here one problem occurring in problem statement specially mention that you can not use an Asterisk Sign(*) So you have to Follow another method.

**Method 2:-**

So here we go we know that multiplication is an addition of one number to another number of (First / Second) number of times. Don't get you let's take an example we want to multiply 20 * 10 so we can add 20 into 10 times like 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 = 200 or we can add 10 into 20 times answer will be same like 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 = 200. Here i am using method 2.

**Solution:-**

#include<iostream>

using namespace std;

int main ()

{

long a,b,i,temp=0;

cout<<"Enter Two numbers for multiplication : \n";

cin>>a>>b;

for(i=1;i<=b;i++)

{

temp=temp+a;

}

cout<<endl<<"Result are : "<<temp<<endl;

}

**Output:-**

**You May Also Like:-**

1. C++ Program To Find Sum Of Series 1+1/2^2+1/3^3+…..+1/n^n.

2. C++ Program To Print A Pascal's Triangle.

3. C++ Program For Draw A Perfect Christmas Tree.

4. Java Program For Find The Gross Salary Of An Employee.

5. C++ Program For Store Employee Information And Display Using Structure.

6. C++ Program For Converting Temperature Celsius Into Fahrenheit.

7. JAVA Project SMS (School Management System) Using Multiple Classes.

8. Java Program For Calculator Using AWT Controls (GUI).

## No comments:

## Post a Comment