My Subject Blog

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;
}

Comments

Most Visited Post

C Program to Find Largest Odd Number from Array

Followers