Class 9th CBSE

Write a C program to enter two numbers and perform all arithmetic operations.

C Program.......

Write a C program to enter two numbers and perform all arithmetic operations.

Solution :- 

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,sum,sub,mul,div,mod;
printf(“Enter the First number :-“);
scanf(“%d”,&a);
printf(“Enter the Second number :- “);
scanf(“%d”,&b);
sum = a+b;
sub = a-b;
mul = a*b;
div = a/b;
mod = a%b;
printf(“\nThe Sum of two number is :- %d”,sum);
printf(“\nThe Sub of two number is :- %d”,sub);
printf(“\nThe Mul of two number is :- %d”,mul);
printf(“\nThe Div of two number is :- %d”,div);
printf(“\nThe Mod of two number is :- %d”,mod);
getch();
}

Solution  :- 

 

 

Solution  :- 

 

Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable

Popular Videos

Play Video

UX for Teams

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer

Play Video

SEO & Instagram

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer