In this easy coded program, you will learn how the multiplication of two numbers takes place using two variables.
Actually, using less variables is preferred the most wherever possible. Rather, the same program can also be solved using three variables.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Hope you found this 'C Program for Multiplication of Two Numbers(2 Variables)' easy, simple and helpful!
Try to solve more queries by yourself by referring more examples from BEGINC. Here you will get the most easiest code to each and every query. Keep practicing. More programs are coming.
Actually, using less variables is preferred the most wherever possible. Rather, the same program can also be solved using three variables.
---------------------------------------------------------------------------
Program for Multiplication of Two Numbers
/*Multiplication of Two Numbers using Two Variables*/
|
#include<stdio.h>
|
void main()
|
{
|
int
a, b;
|
printf("Enter Two Numbers: ");
|
scanf("%d %d", &a, &b);
|
printf("\nThe Multiplication of %d and %d is %d.",
a, b, a*b);
|
/*You can exclude
the step below.*/
|
printf("\ni.e. %dX%d=%d", a, b, a*b);
|
}
|
Output
Enter Two Numbers: 5 7
The Multiplication of 5 and 7 is 35.
i.e. 5X7=35
---------------------------------------------------------------------------
Hope you found this 'C Program for Multiplication of Two Numbers(2 Variables)' easy, simple and helpful!
Try to solve more queries by yourself by referring more examples from BEGINC. Here you will get the most easiest code to each and every query. Keep practicing. More programs are coming.
Comments
Post a Comment
Please do not comment any spam links in the comment box.