Obliczanie powierzchni w milach stopach i calach
#include <stdlib.h> /* standart library */ #include <stdio.h> /* standart input output */ #include <math.h> /* math's functions - like power */ /* well known const's */ #define obszar 2337 #define mil_kw_na_km_kw 0.3861021585424458 #define stop_kw_na_mil_kw 5280*5280 #define cali_kw_na_stope_kw 144 /* ***************************************** */ int main () { char ch; double space, mil_kw, stop_kw, cal_kw; printf("Podaj powierzchnie -> "); scanf("%lf",&space); mil_kw = mil_kw_na_km_kw * space; stop_kw = stop_kw_na_mil_kw * mil_kw; cal_kw = cali_kw_na_stope_kw * stop_kw; printf("mil kw = %30.10lf\n",mil_kw); printf("stop kw = %30.10lf\n",stop_kw); printf("cal kw = %30.10lf\n",cal_kw); printf("[PRESS ENTER]"); scanf("%c",&ch); getchar(); return 0; }
2012.11.22 22:29:34.