#include<stdio.h>
int main(){
float first, second, distance;
printf("Enter the mass of the first body\n");
scanf("%f",&first);
printf("Enter the mass of the second body\n");
scanf("%f",&second);
printf("Enter the distance between the two bodies\n");
scanf("%f",&distance);
float force = (6.67* 10 * second * first ) / distance * distance;
printf("The force is: %f", force);
return 0;
}
Comments
Leave a comment