Ответ:
#include <iostream>
using namespace std;
bool srav(int a, int b)
{
if (a > b)
return 1;
else
return 0;
}
int main()
int number = 0;
int AB = 1, CD = 1;
cout << "Input A , B\n";
//Произведение A на B
for (int i = 0; i <= 1; i++)
cin >> number;
AB *= number;
cout << "A*B = " << AB << endl;
CD *= number;
cout << "C*D = " << CD << endl;
if(srav(AB,CD))
cout<<"A*B > C*D";
cout << "C*D > A*B";
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
#include <iostream>
using namespace std;
bool srav(int a, int b)
{
if (a > b)
return 1;
else
return 0;
}
int main()
{
int number = 0;
int AB = 1, CD = 1;
cout << "Input A , B\n";
//Произведение A на B
for (int i = 0; i <= 1; i++)
{
cin >> number;
AB *= number;
}
cout << "A*B = " << AB << endl;
for (int i = 0; i <= 1; i++)
{
cin >> number;
CD *= number;
}
cout << "C*D = " << CD << endl;
if(srav(AB,CD))
cout<<"A*B > C*D";
else
cout << "C*D > A*B";
return 0;
}
Объяснение: