C Program Mathematical Operations
/*Write a program that reads two nos. from keyboard and gives their addition, subtraction, multiplication, division and modulo. */
#include <stdio.h>
int main(void) {
int i,j;
printf("Enter First Value : ");
scanf("%d",&i);
printf("Enter Second Value : ");
scanf("%d",&j);
printf("\nAddition = %d",i+j);
printf("\nSubtraction = %d",i-j);
printf("\nMultiplication = %d",i*j);
printf("\nDivision = %d",i/j);
printf("\nModulo = %d",i%j);
return 0;
}
#include <stdio.h>
int main(void) {
int i,j;
printf("Enter First Value : ");
scanf("%d",&i);
printf("Enter Second Value : ");
scanf("%d",&j);
printf("\nAddition = %d",i+j);
printf("\nSubtraction = %d",i-j);
printf("\nMultiplication = %d",i*j);
printf("\nDivision = %d",i/j);
printf("\nModulo = %d",i%j);
return 0;
}
Comments
Post a Comment