21: Write a program to demonstrate arithmetic
operator.
Please follow me for more practicals....
Program:
#include <stdio.h>
#include <conio.h>
void main()
{
clrscr();
int num1, num2;
printf("Enter the first number = ");
scanf("%d", &num1);
printf("Enter the second number = ");
scanf("%d", &num2);
printf("\n\nThe Addition = %d\nThe
Subtraction = %d\nThe Multiplication = %d\nThe Division = %d\nThe Modulo = %d",
num1 + num2, num1 - num2, num1 * num2, num1 / num2, num1 % num2);
getch();
}
Please follow me for more practicals....
Output:
Enter the first number = 5
Enter the second number = 4
The Addition = 9
The Subtraction = 1
The Multiplication = 20
The Division = 1
The Modulo = 1
Please follow me for more practicals....
Algorithm:
1. START
2. Declare num1, num2.
3. Enter the num1 and num2
4. Display num1 + num2, num1 - num2, num1 * num2, num1 /
num2, num1 % num2.
5. STOP
Please follow me for more practicals....
Flowchart: