Physics program in C

Need help with this program in C please

The distance of object (p) and the distance to the image (q) are dependent on how "curved" the lens is, called the focal point (f).

1/f= 1/p + 1/q

Given the object distance (p) and image distance (q), find the distance to the focus (f). Print out the focus with the distance rounded to the nearest tenth.

It has to be in C, no c++ and run in Visual Studio 2015.
What do you need help with?
closed account (48T7M4Gy)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

int main()
{
    // get p from user
    // get q from user

    1/f= 1/p + 1/q;
    
    // display f (rounded off)

    
    return 0;
}
Topic archived. No new replies allowed.