Two numbers are multiplied with each other without using * function.Suppose n1 and n2 are two numbers.The number n1 is added to itself until the number n2 decrements to 0.For this two variables ans and temp are considered.The variable ans stores the incrementing sum and temp variable stores the value of n2.The variable temp is decremented by 1 until it reaches 0 and the sum is stored in ans.

#include < stdio.h > #include < conio.h > void main() { int n1,n2,temp,ans=0; clrscr(); printf("Enter the first number\n"); scanf("%d",&n1); printf("Enter the second number\n"); scanf("%d",&n2); temp=n2; while(temp!=0) { ans+=n1; temp--; } printf("The multiplication is %d",ans); }//main