Даны два двузначных числа ab и cd. Если a>c, b>d, то вывести "Yes", иначе "No".
С++ прошу, помогите
Ответы на вопрос
Ответил petyaGavrikov
0
#include <iostream>
using namespace std;
int main()
{
int x, y;
cout << "x = ", cin >> x, cout << "n";
cout << "y = ", cin >> y, cout << "n";
if ((x/10 > y/10)&&(x%10 > y%10)) cout << "Yes" << "n";
else cout << "No" << "n";
return 0;
}
Пример:
x = 25
y = 14
Yes
using namespace std;
int main()
{
int x, y;
cout << "x = ", cin >> x, cout << "n";
cout << "y = ", cin >> y, cout << "n";
if ((x/10 > y/10)&&(x%10 > y%10)) cout << "Yes" << "n";
else cout << "No" << "n";
return 0;
}
Пример:
x = 25
y = 14
Yes
Новые вопросы