How to divide 2 int in c?
You need a double variable to store the result. int stores only integers. Additionally, you have to typecast the other variables also before performing the division. Do something like this NOTE: You do not need the & in printf() statements.