What are different Arithmetic Operators?
Arithmetic Operators
On this page
Arithmetic Operators
#include <stdio.h>
int main() {
int a = 10, b = 3;
int sum, subtraction, product, quotient, remainder;
sum = a + b;
subtraction = a - b;
product = a * b;
quotient = a / b;
remainder = a % b;
printf("Sum %d\n", sum);
printf("Subtraction %d\n", subtraction);
printf("Product %d\n", product);
printf("Quotient %d\n", quotient);
printf("Remainder %d\n", remainder);
return 0;
}
Output
Sum 13
Subtraction 7
Product 30
Quotient 3
Remainder 1