From 78cc9054cb5169e74449a368b57dfcecedaafe85 Mon Sep 17 00:00:00 2001 From: nikskob Date: Fri, 1 Nov 2024 16:02:17 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B2=D0=B0=D1=8B=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ConsoleApplication1/ConsoleApplication1.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ConsoleApplication1/ConsoleApplication1.cpp b/ConsoleApplication1/ConsoleApplication1.cpp index 5f28270..2b98fd9 100644 --- a/ConsoleApplication1/ConsoleApplication1.cpp +++ b/ConsoleApplication1/ConsoleApplication1.cpp @@ -1 +1,15 @@ - \ No newline at end of file +#include +#include +#include + +void main() +{ + SetConsoleCP(1251); + SetConsoleOutputCP(1251); + printf("Введите радиус шара:"); + float R; + scanf_s("%f", &R); + float pi = 3.14f; + float v = (4.0 / 3.0) * pi * (R * R * R); + printf("Обьем шара равен = %f ", v); +} \ No newline at end of file