Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
struct
//clang 6.0.0 #include <stdio.h> #include <math.h> float vzdalenost (float X, float Y); struct TBod{ float iX; float iY; }; int main(void) { float r; struct TBod bod; bod.iX = 0; bod.iY = 0; //struct TBod bbod = {"bbod", 7, 82}; scanf("%f.",&bod.iX); scanf("%f.",&bod.iY); printf("x %f y %f \n",bod.iX,bod.iY); //r=sqrt(bod.iX*bod.iX+bod.iY*bod.iY); r = vzdalenost (bod.iX,bod.iY); printf("vydalenost je %f\n",r); return 0; } float vzdalenost (float X, float Y) { float r; r = sqrt((X*X)+(Y*Y)); return r; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Cvičenie -č.5-UDP
Use of Arithmetic Operator
Celcius to Farenheir,Romer,Kelvin
Cuadrado asteriscos hueco con regalito
Vectores: Vector inicializado manualmente
Triples bucles anidados
Comprueba si orden creciente
Lee hora y suma un segundo
coucou
Bucles: Suma de n números tecleados por el usuario
Please log in to post a comment.