#include <stdio.h> int main() { int a = 10, b = 4, res; // printing a and b printf("a is %d and b is %d\n", a, b); res = a + b; // addition printf("a+b is %d\n", res); res = a - b; // subtraction printf("a-b is %d\n", res); res = a * b; // multiplication printf("a*b is %d\n", res); res = a / b; // division printf("a/b is %d\n", res); res = a % b; // modulus printf("aMODb is %d\n", res); return 0; }
Write a C Program to demonstrate the working of arithmetic operators.
Reviewed by
on
August 30, 2019
Rating:
