Division of two number in C by R4R Team


program-

#include < stdio.h>
int main()
{
int a,b,c;
//Firt number input
printf("Enter first number\n");
scanf("%d",&a);
//second number input
printf("Enter second number\n");
scanf("%d",&b);
//Now Divide
c=a/b;
//print it
printf("Division is %d",c);
}


output-


Enter first number
2
Enter second number
1
Division is 2

Enter first number
24
Enter second number
4
Division is 6


-In this program, we take a input of two number and store in variable 'a' or variable 'b' then Divide first number by second and store in variable 'c' and at last we print that number.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!