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
lol
Dangling
No warnings!!!
19_1_7
Project 3 Part 1 v1.3
1.c
funciones serie de taylor
Shapes and such
B_141125_MenorMayor
co_assign1_ques_4