Division in C

In the below program is the division of two numbers, the user is need to enter two numbers and the input is fetched using the pre-defined function scanf() and stored in the variables a and b. Then, the variables a divided by the variable b and the result is stored in the variable c.

Here a and b are declared as integer datatype and c declared as float datatype.

Below is the division of two numbers program in C:

void main()
int a,b;
float c;
printf("\n\n\t\t\tDIVISION\n\nEnter the two number: ");
printf("\nQuotient= %f",c);


Leave a Reply