C Program to Division Between Two Numbers

In C programming, division is an arithmetic operation that involves dividing one number by another. The division operator in C program is represented by the forward slash (“/”). The basic syntax for division in C is:

Interger Numbers :

#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c;
printf(“Enter first Number = “);
scanf(“%d”,&a);
printf(“Enter Second Number = “);
scanf(“%d”,&b);
c=a/b;
printf(“Division of two numbers is = %d”,c);
}

Output :

Float Numbers :

#include<stdio.h>
#include<conio.h>
main()
{
float a,b,c;
printf(“Enter first Number = “);
scanf(“%f”,&a);
printf(“Enter Second Number = “);
scanf(“%f”,&b);
c=a/b;
printf(“Division of two numbers is = %f”,c);
}

Output :

Leave a Comment

Your email address will not be published.

Shopping Basket
Verified by MonsterInsights