ВОООООООТ!!!! Этапы 1 2 и 3
Ответ:
#include <iostream>
using namespace std;
int main() {
float x, y;
cout << endl<<"Input first number: ";
cin >> x;
cout <<endl<< "Input second number: ";
cin >> y;
if(x>y)
cout << endl << "Result: "<<x;
else
cout << endl << "Result: "<<y;
}
Объяснение:
// 7
begin
var arr := ArrRandom(13);
arr := arr.OrderByDescending(x->x).ToArray;
arr.Println;
Print('Sum = ', arr.Where(x->x>10).Sum() + newline +
'Count = ',arr.Where(x->x>10).Count);
end.
// 8
begin
var arr := ArrRandom(10);
Sort(arr);
arr.Println;
Print('Sum = ', arr.Where(x -> x mod 5 = 0).Sum() + newline +
'Count = ', arr.Where(x -> x mod 5 = 0).Count);
end.
// 9
begin
var arr := ArrRandom(15);
arr := arr.OrderByDescending(x -> x).ToArray;
arr.Println;
Print('array elements squares sum is = ', arr.Sum(x -> x * x));
end.