June 1, 2023
Program to use multiply two positive numbers in C Language
#include <stdio.h>
int main()
{
int a, b, i;
int result = 0;
printf("enter two number to be multiplied : ");
scanf("%d%d", &a, &b);
for (i = 1; i <= b; i++)
{
result = result + a;
}
printf("result = %d\n", result);
return 0;
}
output
enter two number to be multiplied : 4
3
result = 12
by : Nadeem Khan
Quick Summary:
Two values will be put in it, it will be multiplied