Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

closed how to get product of two numbers

+7 votes
asked Aug 5, 2019 by anonymous
closed Jun 14, 2020 by Admin
closed with the note: Since it has been answered

15 Answers

+1 vote
answered Aug 5, 2019 by Loki (1,600 points)
To get the multiplication of two numbers simply use the binary operator * (asterisk) to multiply two numbers, constants or variables.

int variable1 = 10, variable2 = 20;

printf("%d", variable1 * variable2);

or you could store it in another variable.

variable3 = variable1 * variable2;
+2 votes
answered Aug 5, 2019 by bijaykumar (180 points)
#include<stdio.h>

#include<conio.h>

#include<math.h>

int main(

int a,b,mul;

printf("Enter the two number");

scanf("%d%d",&a,&b);

mul=a*b;

printf("The product of two number is %d",mul);

return 0;

}
commented Jun 11, 2020 by khajesh narayana (190 points)
there is a simple method
0 votes
answered Aug 5, 2019 by anonymous
reshown Jun 14, 2020 by Admin
  1. #include<stdio.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. int one, two, multiply;
  6. printf("Enter first number - ");
  7. scanf("%d",&one);
  8. printf("Enter second number - ");
  9. scanf("%d",&two);
  10. multiply = one * two;
  11. printf("The multiplication of numbers %d and %d is %d",one,two,multiply);
  12. getch();
  13. }
+1 vote
answered Aug 6, 2019 by Raghav7425 (320 points)

For Python,

a=14

b=5

print(a*b)

It will result in 70

0 votes
answered Sep 11, 2019 by anonymous
  • simple way to solve the product of two numbers.

first declare three variables like a,b,c.And then read the values.After that perform product between them.we take c as storing the product.

PROGRAMME;

#include<stdio.h>

​​int main()

{

int a,b,c;

printf("enter a,b values");

scanf("%d",&a,&b);

c=a*b;

printf("%d",c);

}

0 votes
answered Sep 11, 2019 by Monu kumar (140 points)
#include<stdio.h>

int main()

{

int a,b,p;

printf("enter two numbers a and b");

scanf("%d%d",&a,&b);

p=a*b;

printf("product is: %d",p);

return 0;

}
0 votes
answered Sep 12, 2019 by Ajay Kumar (140 points)
#include<stdio.h>

int main()

{

int a,b,c;

printf("enter a no");

scanf("%d %d",&a,&b);

c=a*b;

printf("the product of two no is %d,c);

}
0 votes
answered Sep 17, 2019 by vaibhavgramni (140 points)
void main()

{

int a,b;

printf("enter two number ");

scanf("%d%d",&a,&b);

printf("product is : %d",a*b);

}
0 votes
answered Sep 20, 2019 by Sanjeev sagar
#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,sum,n;

printf("Enter the two number for there product");

scanf("%d%d",&a,&b);

sum=a*b;

printf("%d",sum);

getch();

}
0 votes
answered Sep 20, 2019 by R Pugazhendhi
int main ()

{

int num1;

int num2;

printf("enter the num1:")

scanf("%d",num1);

printf("enter the num2:")

scanf( "%d",num2)

printf(%d,num1*num2)

return 0

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...