# Multiply two positive numbers without using * operator /
#include<conio.h>
int main(){
int a,b,i;
int result=0;
printf("Enter two number to be multiply : ");
scanf("%d%d",&a,&b);
for(i=1;i<=b;i++)
result=result+a;
printf("%d*%d=%d\n",a,b,result);
}
CODE
#include<stdio.h>#include<conio.h>
int main(){
int a,b,i;
int result=0;
printf("Enter two number to be multiply : ");
scanf("%d%d",&a,&b);
for(i=1;i<=b;i++)
result=result+a;
printf("%d*%d=%d\n",a,b,result);
}
0 comments:
Post a Comment