Ответ:
Объяснение:
#include <iostream>
#include <string>
using namespace std;
unsigned long long Sum(string a);
void main()
{
string a, b, c;
cin >> a >> b >> c;
if (Sum(a) > Sum(b) && Sum(a) > Sum(c)) cout << a << " summ bolshe\n";
else if (Sum(c) > Sum(b)) cout << c << " summ bolshe\n";
else if (Sum(b) > Sum(c)) cout << b << " summ bolshe\n";
else if (Sum(a) == Sum(b) && Sum(a) == Sum(c)) cout << "Summ ravni\n";
}
unsigned long long Sum(string a) {
unsigned long long count=0;
for (long long i = 0; i < a.size(); i++) count += ((int)a[i] - 48);
return count;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
Объяснение:
#include <iostream>
#include <string>
using namespace std;
unsigned long long Sum(string a);
void main()
{
string a, b, c;
cin >> a >> b >> c;
if (Sum(a) > Sum(b) && Sum(a) > Sum(c)) cout << a << " summ bolshe\n";
else if (Sum(c) > Sum(b)) cout << c << " summ bolshe\n";
else if (Sum(b) > Sum(c)) cout << b << " summ bolshe\n";
else if (Sum(a) == Sum(b) && Sum(a) == Sum(c)) cout << "Summ ravni\n";
}
unsigned long long Sum(string a) {
unsigned long long count=0;
for (long long i = 0; i < a.size(); i++) count += ((int)a[i] - 48);
return count;
}