Arithmetic Operators - C Program - Basic C Programs
C Program to find out all arithmetic operation on two given values.
/*Program to find all arithmetic operation on two given values*/
#include <stdio.h>
#include <conio.h>
void main()
{
/* Local definitions */
int a,b,c,d;
int sum,sub,mul,rem;
float div;
/* Statements */
printf("ENTER VALUES OF b, c, d: ");
scanf("%d %d %d", &b, &c, &d);
sum b+c; /* Addition operation */
sub = b‒c; /* Subtract operation */
mul = b*c; /* Multiplication operation */
div = b/c; / *Division operation */
rem = b%d; /* Modulo division operation */
a = b/c * d; /* Division and multiplication */
printf("\n sum = %d, sub = %d, mul = %d , div = %f", sum, sub, mul,div);
printf("\n Remainder of division of b & d is %d", rem);
printf("\n a %d",a);
} /* main */
OUTPUT
ENTER VALUES OF b, c, d : 2 6 45
sum = 8, sub = ‒4, mul = 12, div = 0.000000
Remainder of division of b & d is 2
a = 0
EXPLANATION: This program performs all the arithmetic operations such as Addition, subtraction, division, multiplication and modulo division on two operands which are inputted by the user.
Computer Programming C Laboratory: Basic C Programs : Tag: C Programming : - C Program to find out all arithmetic operation on two given values (Arithmetic Operators)
Computer Programming C Laboratory
CS25C01 1st Semester EEE, ECE, CSE, CSE(CY), AIDS, IT practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation
English Essentials I
EN25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
தமிழர் மரபு - Heritage of Tamils
UC25H01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
Applied Calculus
MA25C01 Maths 1 M1 - 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
Applied Physics I
PH25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
Applied Chemistry I
CY25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
Makerspace
ME25C04 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
Computer Programming C
CS25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
Computer Programming Python
CS25C02 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation
Fundamentals of Electrical and Electronics Engineering
EE25C03 1st Semester EEE Depart | 2025 Regulation | 1st Semester 2025 Regulation
Introduction to Mechanical Engineering
ME25C03 1st Semester Mechanical Dept | 2025 Regulation | 1st Semester 2025 Regulation
Introduction to Civil Engineering
CE25C01 1st Semester Civil, Agri Departments | 2025 Regulation | 1st Semester 2025 Regulation
Essentials of Computing
CS25C03 1st Semester - AIDS, CSE, CSE(CY), IT Department | 2025 Regulation | 1st Semester 2025 Regulation
Applied Physics I Laboratory
PH25C01 1st Semester practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation
Applied Chemistry I Laboratory
CY25C01 1st Semester practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation
Computer Programming C Laboratory
CS25C01 1st Semester EEE, ECE, CSE, CSE(CY), AIDS, IT practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation
Computer Programming Python Laboratory
CS25C02 1st Semester practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation
Engineering Drawing
ME25C01 EEE, Mech, Agri, EEE Depts | 2025 Regulation | 2nd Semester 2025 Regulation
Basic Electronics and Electrical Engineering
EE25C04 1st Semester ECE Dept | 2025 Regulation | 1st Semester 2025 Regulation
Essentials of Computing - Laboratory
CS25C03 1st Semester AIDS, CSE, CSE(CY), IT Depts | practical Laboratory Manual | 2025 Regulation | 1st Semester 2025 Regulation