Just wrote such easy programme, but after i enter the value when it asks for it, it dont stop the screen with calculations. Whats the problem? Was trying with system ("pause"); but doesnt help. Here is the code:
Quote
#include <stdio.h>
#include <math.h>
#define grawitacja 9.81
float CzasSpadku(float h)
{
return(sqrt(2.0*h/grawitacja));
}
float predkosc(float h)
{
return(grawitacja*CzasSpadku(h));
}
float Vkmh(float v)
{
return(3.6*v);
}
int main()
{
float w;
printf("Podaj wysokosc w metrach : ");
scanf ("%f",&w);
printf("Wysokosc : %0.2f [m]\n", w);
printf("Czas : %0.2f \n", CzasSpadku(w));
printf("P{redkosc : %0.2f [m/s]\n", predkosc(w));
printf("Predkosc : %0.2f [km/h]\n", Vkmh(predkosc(w)));
return (0);
}
This post was edited by Insi_Cannabis on Apr 12 2015 03:00pm