# Function exercise

This is a discussion on Function exercise within the C Programming forums, part of the General Programming Boards category; Hi everyone can anyone help me with this little problem... Write a program that requests two floating-point numbers and prints ...

1. ## Function exercise

Hi everyone can anyone help me with this little problem...

Write a program that requests two floating-point numbers and prints the value of their difference divided by their product.

I do not understand what is ment by getting their difference or how to get it, can anyone please help me out with a little example(the calculation), please...

2. im not to sure what you mean but as for dividing the 2 numbers here is an example

Code:
```#include <stdio.h>
#include <conio.h>

int main(void)
{
float num1 , num2;

printf("Enter 2 Numbers : ");
scanf("%f %f" , &num1 , &num2);
printf("%.2f Divided by %.2f is %.2f\n" , num1 , num2 , num1 / num2);

system("pause");

return 0;
}```
[edited]
also because they are floats it will have the remainder.
[/edited]

3. difference is the values subtracted from each other

difference between 1 and 5 is 4 (ie 5-1);

so subract the values save the result as difference;
multiply the values save the result as product;
then take difference/product;

4. Thank you...

5. Do NOT request people do your homework for you. Read the Announcements. But as they say, it's too late now. Congradulations, you'll go far in life if you can get everyone to do everything for you all the time.

Quzah.

6. Surprised you don't know what 'difference' means, if you're at a grade level in which there's comp sci...

7. I was confused about why it is I need to divide the difference by the product and what this would achieve, obviosly it was just an exercise and the output of the program was nothing but an argument passed to a function...