Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Practice Problem 7
#include <stdio.h> #include <math.h> typedef struct{ int x; int y; int z; }position; int distance(position A,position B){ double d=sqrt((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y)+(A.z-B.z)*(A.z-B.z)); return(d); } int main(){ double C; position A; A.x=1; A.y=1; A.z=1; position B; B.x=2; B.y=2; B.z=2; } C=distance(A,B); printf("distance=%lf",C);
run
|
edit
|
history
|
help
0
Lab 9 v1
hello 5
json formatter
C_141113_euclides
else if
Lior Yehieli Lesson
ex1
tarun ceo
formatting_input_and_output
Project 5 v.06