16 lines
329 B
C
16 lines
329 B
C
#include <stdio.h>
|
|
#include <Windows.h>
|
|
#include <math.h>
|
|
|
|
void main() {
|
|
SetConsoleCP(1252);
|
|
SetConsoleOutputCP(1251);
|
|
|
|
float h;
|
|
printf("Âåäèòå âûñîòó â ìååòðàõ\n");
|
|
scanf_s("%f", &h);
|
|
float g = 9.8;
|
|
float t = sqrt(2 * h / g);
|
|
printf("Ïðåäìåò ïàäàåò ñ âûñîòû %f ìåòðîâ\n", h);
|
|
printf("Îí óïàäåò ÷åðåñ %f ñåêóíä\n", t);
|
|
} |