C Program Division of Numbers

C – Division of Numbers C Program Code

#include
#include
void main()
{
int a,b,c;
clrscr();
printf(“Enter two numbers:n”);
scanf(“%d%d”,&a,&b);
if(b==0)
{
printf(“Value of b cannot be zero.”);
}
else
{
c=a/b;
printf(“Result of division is %d”,c);
}

getch();
}

Add Comment