1 Attachment(s)
Help me get this to work please
Attachment 15222
Code:
#include <stdio.h>
#include <math.h>
int main()
{
float r, F, G, m1, m2;
float gravitationalforce;
/*
* User inputs the distance & mass of the two objects.
*/
printf("Enter the mass of the two object 2: ");
scanf("%f, &m1,");
printf("Enter the mass of the object 2: ");
scanf("%f, &m2");
printf("Enter the distance of the object: ");
scanf("%f, &r");
/*
* Distance and mass is inputted.
*/
gravitationalforce = 6.674e-11;
printf("\nGravitational force : %20f ",F);
/*
* Values inputted provide gravitational force.
*/
return(0);
}
Not sure how to input the F = G m1*m2 / r^2 part