C Language

May 20, 2023

How to use Arithmetic operators in C Language

Program to use Arithmetic operators in C Language


#include <stdio.h>
int main()
{
    int a = 17, b = 4;
    printf("sum=%d\n", a + b);
    printf("defference=%d\n", a - b);
    printf("proudct=%d\n", a * b);
    printf("quotient=%d\n", a / b);
    printf("remainder=%d\n", a % b);
    return 0;
}

output


sum=21
difference=13
product=68
quotient=4
remainder=1

by : Nadeem Khan

Quick Summary:

First 17 and 4 will be added, then 17 and 4 will be subtracted, than multiplication will happen, than division will happen, then remainder will come out