Laba4/Laba.1/Project1/Source.c
2024-12-23 13:58:48 +04:00

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);
}