#include<stdio.h>
#include<conio.h>
main()
{
int a,b,i,t,s=0;
clrscr();
printf("Enter two numbers to multiply \n");
printf("A ,B :");
scanf("%d,%d",&a,&b);
if(a>b)
{
t=a;
a=b;
b=t;
}
for(i=1;i<=a;i++)
{
s=s+b;
}
printf("\n Your answer is %d ",s);
getch();
}
OUTPUT
Enter two number to multiply
A,B :100,22
Your answer is 22000
#include<conio.h>
main()
{
int a,b,i,t,s=0;
clrscr();
printf("Enter two numbers to multiply \n");
printf("A ,B :");
scanf("%d,%d",&a,&b);
if(a>b)
{
t=a;
a=b;
b=t;
}
for(i=1;i<=a;i++)
{
s=s+b;
}
printf("\n Your answer is %d ",s);
getch();
}
OUTPUT
Enter two number to multiply
A,B :100,22
Your answer is 22000
No comments:
Post a Comment