From 7490b26db12fcdc5ef0586660a6c6ab5cc3d5790 Mon Sep 17 00:00:00 2001 From: "Bob (Ksenia)" <ksenia@cat.ru> Date: Sun, 31 Mar 2024 21:41:34 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BC?= =?UTF-8?q?=D0=B8=D0=BD=D0=B8=D0=BC=D1=83=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.cpp b/main.cpp index 7318c10..2048011 100644 --- a/main.cpp +++ b/main.cpp @@ -15,9 +15,17 @@ cout << "A + B = " << a + b << '\n' float m[4]={a+b, a-b, a*b, a/b}; float maxx=0; for (int i=0; i<4; i++){ + if(maxx<m[i]){ maxx=m[i]; } } cout<<endl<<"Maximum: "<<maxx; + + if(maxx>m[i]){ + maxx=m[i]; + } + } + cout<<endl<<"Minimum: "<<maxx; + }