C program to Perform Multiplication of Two Integers

C program to Perform Multiplication of Two Integers





// C program to perform multiplication of two integers
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter first number:\n");
scanf("%d",&a);

printf("Enter second number:\n");
scanf("%d",&b);
c=a*b;
printf("Output\n");
printf("The multiplication of two numbers is:%d\n",c);
printf("End of program");
}


Enter first number:

10

Enter second number:

10

Output

The multiplication of two numbers is:100

End of program




// C program to perform multiplication of two integers
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter two numbers:\n");
scanf("%d%d",&a,&b);
c=a*b;
printf("Output\n");
printf("The multiplication of two numbers is:%d\n",c);
printf("End of program");
}


Enter two numbers:

10 10

Output

The multiplication of two numbers is:100

End of program



// C program to perform multiplication of two integers
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter two numbers:\n");
scanf("%d%d",&a,&b);
printf("Output\n");
printf("The multiplication of two numbers is:%d\n", a*b);
printf("End of program");
}


Enter two numbers:

10 10

Output

The multiplication of two numbers is:100

End of program


In the above program multiplication of two numbers is not stored in any variable. Direct multiplication process has been takes place in printf() function.


टिप्पणी पोस्ट करा

0 टिप्पण्या