CALCULATE FORCE
Code :
#include<stdio.h>
float force(float mass);
int main()
{
float force_val, m;
printf("\tCALCULATE FORCE EXERTED BY EARTH\n");
printf("------------------------------------------------\n");
printf("Enter mass of the body in kgs : ");
scanf("%f", &m);
force_val = force(m);
printf("\nThe value of Force in Newton is %.2f\n\n", force_val);
printf("************************************************\n");
return 0;
}
float force(float mass)
{
float result;
result = mass * 9.8;
return result;
}