Skip to content
Snippets Groups Projects
Commit cfe76c98 authored by Stanisław Pokora's avatar Stanisław Pokora
Browse files

Upload New File

parent ce53b2be
No related merge requests found
#ifndef ENERGIA_H_INCLUDED
#define ENERGIA_H_INCLUDED
#include <stdio.h>
#include <math.h>
float energia(m1, m2, m3, v1x, v1y, v1z, v2x, v2y, v2z, v3x, v3y, v3z){
float v1kw = v1x*v1x + v1y*v1y + v1z*v1z;
float v2kw = v2x*v2x + v2y*v2y + v2z*v2z;
float v3kw = v3x*v3x + v3y*v3y + v3z*v3z;
float energy = m1*v1kw + m2*v2kw + m3*v3kw;
printf("Energia kinetyczna ukladu wynosi %.2f J \n", energy/2);
}
#endif // ENERGIA_H_INCLUDED
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment