Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Unit-1

16/01/2021
Arithmetic Operators

#include <stdio.h>
#include <conio.h>
Void main()
{

int a = 21;
int b = 10;
int c ;

c = a + b;
printf("Addition is %d\n", c );

c = a - b;
printf("Subtraction is %d\n", c );

c = a * b;
printf("Multiplication is %d\n", c );

c = a / b;
printf("Division is %d\n", c );

c = a % b;
printf("Modulus is %d\n", c );

PGDCA NOTES – PROGRAMMING IN C Page 23


When you compile and execute the above program, it
produces the following result −
Addission is 31
Subtraction c is 11
Multiplication is 210
Division is 2
Modulus is 1

Attendance:18/45

PGDCA NOTES – PROGRAMMING IN C Page 24

You might also like