Программа:
C++:
#include <iostream>
using namespace std;
int main()
{
int arr[50];
int i, summ = 0;
for (i = 0; i < 50; i++) {
arr[i] = rand();
if (arr[i] > 50) { summ += arr[i]; }
}
cout << summ;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Программа:
C++:
#include <iostream>
using namespace std;
int main()
{
int arr[50];
int i, summ = 0;
for (i = 0; i < 50; i++) {
arr[i] = rand();
if (arr[i] > 50) { summ += arr[i]; }
}
cout << summ;
}