Поставь мне 5 звёзд и лучший ответ :D
1.
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
long long a, b;
cin >> a >> b;
cout << a*b << " " << (a+b)*2 << " " << sqrt(a*a + b*b) << endl;
return 0;
}
2.
long long a, b, c;
cin >> a >> b >> c;
if(a == b || a == c || b == c)
cout << "YES" << endl;
else
cout << "NO" << endl;
3.
int a;
cin >> a;
if(a <= 3)
cout << "low" << endl;
if(a <= 6)
cout << "medium" << endl;
if(a <= 9)
cout << "prehigh" << endl;
cout << "high" << endl;
4.
long long a;
if(a/10%10 > a/1000)
Объяснение:
Поставь мне 5 звёзд и лучший ответ :D
1.
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
long long a, b;
cin >> a >> b;
cout << a*b << " " << (a+b)*2 << " " << sqrt(a*a + b*b) << endl;
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
long long a, b, c;
cin >> a >> b >> c;
if(a == b || a == c || b == c)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
}
3.
#include <iostream>
using namespace std;
int main()
{
int a;
cin >> a;
if(a <= 3)
cout << "low" << endl;
else
if(a <= 6)
cout << "medium" << endl;
else
if(a <= 9)
cout << "prehigh" << endl;
else
cout << "high" << endl;
return 0;
}
4.
#include <iostream>
using namespace std;
int main()
{
long long a;
cin >> a;
if(a/10%10 > a/1000)
cout << "YES" << endl;
else
cout << "NO" << endl;
return 0;
}
Объяснение: