Why the results appear like what? We need more information then just "I want to know whats wrong", because that doesn't help us. What is the result suppose to be like? What result are you getting? Where do you think the problem is? What have you tried to fix it? These are some questions you can answer to help get a better reply :).
Otherwise we don't know really what to look for. Though I did see two things you are doing that you don't need to do.
1) In your function you are casting variables to (double), double result = (double) (mass1*mass2*G) / (distance*distance) ;. The thing is though is every variable in the expression already is a double so there is no need for the explicit cast. Also when you do want to do a explicit cast I would recommend you use static_cast<type to cast>(what you want to cast) instead.
2) In your function you are declaring a temporary variable to hold the result of your expression double result. Granted it isn't illegal to do this, it just isn't needed. You can just return the result of your expression like this
Anyways them are just two minor things I saw just by glancing, let us know what you are having trouble with exactly and we will try and guide you through it.
You still really didn't give enough info, but from what you said I gather you aren't getting enough precision. How precise do you want it to print?
1 2
cout.precision(15);
cout << "The Gravitional Force in newtons is : " << fixed << result << endl ;
This will give you 15 digits precision.
OUTPUT
Please Enter the following intformation :
Mass of body 1 (in Kg) : 10
Mass of body 2 (in Kg) : 10
The distance between them (in m): 10
The Gravitional Force in newtons is : 0.000000000066740
Any more caculations ? (Y/N)
n
Process returned 0 (0x0) execution time : 8.680 s
Press any key to continue.
Again I'm not to sure what you want the output to be so not sure what exactly is going wrong for you so I am just taking guesses.