Hey guys, I have just written C program that calculates the force of a body using F = ma but there is some sort of problem occuring , could you please help me fix the error.
richkid
0
Newbie Poster
Recommended Answers
Jump to PostYour assignments did not match up.
#include <stdio.h> #include <math.h> int main(void) { double Force; double mass; double a=9.81; printf("Enter the mass value: "); scanf("%lf", &mass); Force= mass*a; printf("The Force of the body is : %5.2f\n", Force); return 0; }
All 4 Replies
Beg.CProgrammer
0
Newbie Poster
banders7
1
Newbie Poster
banders7
1
Newbie Poster
chescarleta18
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.