From 33f8fee1922105c6288fc6f4859f4c30750032cd Mon Sep 17 00:00:00 2001 From: "Bob (KrivobokovNS)" Date: Mon, 26 May 2025 15:13:33 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BC=D0=B8?= =?UTF-8?q?=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 | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index aec2a2f..8d7e0f9 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,6 @@ + #include +using namespace std; int main () { cout << "Enter A and B: "; int a, b; @@ -7,14 +9,24 @@ int main () { << "A - B = " << a-b << '\n' << "A * B = " << a*b << '\n' << "A / B = " << a/b << '\n'; - if (a>b) { - cout << 'Maximum:' << a; + + if (a>b) { + cout << "Maximum:" << a; + } else { + if (b>a) { + cout << "Maximum:" << b; + } + } + cout << '\n'; + if (aa) { - cout << 'Maximum:' << b; - } else { - cout << 'a and b are equal.'; - } + cout << "a and b are equal."; } + } return 0; }