Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
/**Bismillahir Rahmanir Rahim.**/ #include <stdio.h> int main() { double a,b,c,d,x1,x2,y1,y2; scanf ("%lf%lf", &x1, &y1); scanf ("%lf%lf", &x2, &y2); a=(x2-x1)*(x2-x1); b=(y2-y1)*(y2-y1); c=a+b; d=pow(c,.5); printf ("%.4lf\n",d); return 0; }
0 comments:
Post a Comment
Note: only a member of this blog may post a comment.