C Program of Add and Multiply two Integer:
In this blog we learn how to perform addition, multiplication, of any two numbers taking from user by using simple logic.
####################################################################################
#include <stdio.h>
#include <stdlib.h>
int main()
{
int num1,num2;
printf("Enter the first number: ");
scanf("%d",&num1);
printf("Enter the second number: ");
scanf("%d",&num2);
printf("\nAddition of %d + %d",num1,num2);
printf(" = %d",(num1+num2 ));
printf("\nSubstraction of %d - %d",num1,num2);
printf(" = %d",(num1-num2));
printf("\nMultiplication of %d X %d",num1,num2);
printf(" = %d",(num1*num2 ));
printf("\nDivision of %d / %d",num1,num2);
printf(" = %d",(num1/num2 ));
getch();
return 0;
#include <stdio.h>
#include <stdlib.h>
int main()
{
int num1,num2;
printf("Enter the first number: ");
scanf("%d",&num1);
printf("Enter the second number: ");
scanf("%d",&num2);
printf("\nAddition of %d + %d",num1,num2);
printf(" = %d",(num1+num2 ));
printf("\nSubstraction of %d - %d",num1,num2);
printf(" = %d",(num1-num2));
printf("\nMultiplication of %d X %d",num1,num2);
printf(" = %d",(num1*num2 ));
printf("\nDivision of %d / %d",num1,num2);
printf(" = %d",(num1/num2 ));
getch();
return 0;
printf("Enter the first number: ");
printf("Enter the second number: ");
scanf("%d",&num2);
// Now we Write for Addition
printf("\nAddition of %d + %d",num1,num2);
printf(" = %d",(num1+num2 ));
// Now We write For Multiply
printf("\nMultiplication of %d X %d",num1,num2);
printf(" = %d",(num1*num2 ));
#include <stdlib.h>
int main()
{
int num1,num2;
printf("Enter the first number: ");
scanf("%d",&num1);
printf("Enter the second number: ");
scanf("%d",&num2);
printf("\nAddition of %d + %d",num1,num2);
printf(" = %d",(num1+num2 ));
printf("\nSubstraction of %d - %d",num1,num2);
printf(" = %d",(num1-num2));
printf("\nMultiplication of %d X %d",num1,num2);
printf(" = %d",(num1*num2 ));
printf("\nDivision of %d / %d",num1,num2);
printf(" = %d",(
Example:
Enter the first number: 60
Enter the second number: 15
Addition of 60 + 15 = 75
Multiplication of 60 X 15 = 900
#####################################################################################