diff --git a/lab1.c b/lab1.c index e26f8c4..3cea02c 100644 --- a/lab1.c +++ b/lab1.c @@ -1,5 +1,6 @@ #include #include +#include int AboutMe() { printf("Камалов Даниил Максимович\n"); @@ -15,6 +16,44 @@ int AboutMe() { void main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); + /*float h = 12.0; + float g = 9.8; + float t = sqrt(2 * h / g); + printf("Время падения с высоты %.2f будет %.2f", h, t);*/ + + /*float h; + printf("высота равна = "); + scanf_s("%f", &h); + + float g = 9.8; + float t = sqrt(2 * h / g); + printf("Время падения с высоты %.2f будет %.2f", h, t);*/ + + /*float S; + printf("Площадь = "); + scanf_s("%f", &S); + + float P; + printf("Стоимость за метр = "); + scanf_s("%f", &P); + + float C = S * P; + + printf("Будет стоить %.2f",C);*/ + + /*float S; + printf("Площадь = "); + scanf_s("%f", &S); + + float P; + printf("Стоимость за метр = "); + scanf_s("%f", &P); + + float C = S * P; + + float zp; + printf("зарплата = "); + scanf_s("%f", &zp); /*printf("Камалов Даниил Максимович\n"); printf("16.12.2005\n"); @@ -41,4 +80,6 @@ void main() { printf(" *** *** \n"); printf(" ******** \n");*/ + f = d * p; + printf("В среднем за неделю ты тратишь %.2f", f); } \ No newline at end of file