calculate force

#include <stdio.h>
float force(float mass);
int main()
{
    float m;
    printf("Enter the value of masss in kgs:\n");
    scanf("%f", &m);
    printf("The value of force in Newton is:% 0.2f", force(m));

    return 0;
}
float force(float mass)
{
    return mass*9.8;
}

Comments

Popular posts from this blog

snake game Version-2 (using random number)

allocating dynamic memory using calloc

store a table in dynamic array and then change the size of array dynamically to store more numbers