Program to input two number and print their multiplication in C.
In this program we input two number and find the multiplication. For this 1st we input a number and then 2nd number or if you want to input both in once, it's depend on you. So let's begin
/*Program to multiplicate two number*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,m=0;
clrscr();
printf("Enter 1st number=");
scanf("%d",&a);
printf("Enter 2nd number=");
scanf("%d",&b);
m=a*b;
printf("Multiplication=%d",m);
getch();
}
OUTPUT
Note:- If you want to calculate floating value then you can use "float",for both use "double" replace "int".
Related Examples
Share and Comment and Follow for recently updates.
You can follow me on "Google+".
/*Program to multiplicate two number*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,m=0;
clrscr();
printf("Enter 1st number=");
scanf("%d",&a);
printf("Enter 2nd number=");
scanf("%d",&b);
m=a*b;
printf("Multiplication=%d",m);
getch();
}
OUTPUT
Note:- If you want to calculate floating value then you can use "float",for both use "double" replace "int".
Related Examples
- Write a program to input two number and print their sum or addition.
- Write a program to input two number and print their subtraction.
Share and Comment and Follow for recently updates.
You can follow me on "Google+".
Comments
Post a Comment