Skip to content
Snippets Groups Projects
Commit 7106f39f authored by Jakub Walas's avatar Jakub Walas
Browse files

Upload New File

parent 5a775b4b
No related merge requests found
#include <stdio.h>
int main(){
int i;
float w[3],s[3],f[3],W;
for(i=0;i<=2;i++){
printf("Podaj %i skladowa sily jaka dzialajaca na cialo\n",i+1);
scanf("%f",&f[i]);
}
for(i=0;i<=2;i++){
printf("Podaj %i skladowa przemieszczenia ciala\n",i+1);
scanf("%f",&s[i]);
}
W=0;
for(i=0;i<=2;i++){
w[i]=f[i]*s[i];
W=W+w[i];
}
printf("Praca wynosi %.2f",W);
}
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