diff --git a/main.cpp b/main.cpp index 85db4d6..08beee3 100644 --- a/main.cpp +++ b/main.cpp @@ -7,6 +7,16 @@ int main() cout << "Enter A and B: "; int a, b; cin >> a >> b; - cout << "A + B = " << a + b << '\n'<< "A - B = " << a - b << '\n'<<"A * B = " << a * b <<'\n' << "A / B = " << a / b; + cout << "A + B = " << a + b << '\n'<< "A - B = " << a - b << '\n' << "A * B = " << a * b; + + float p[4] ={a+b, a-b, a*b, a/b}; + + float mins=10000; + for (int i=0; i<4; i++){ + if (mins>p[i]){ + mins=p[i]; + } + } + cout <