Ответ:
#include <iostream>
using namespace std;
#define n 200
int main()
{
int a[n];
int max = 0;
int sum = 0;
for(int i=0; i<n; i++)
a[i] = rand() % 25 + 10;
cout<<a[i]<<" ";
if(max < a[i])
max = a[i];
}
if(a[i] == max)
sum+=1;
cout<<"The maximum number is found "<< max << "times"<<endl;
return 0;
Объяснение:
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
#include <iostream>
using namespace std;
#define n 200
int main()
{
int a[n];
int max = 0;
int sum = 0;
for(int i=0; i<n; i++)
{
a[i] = rand() % 25 + 10;
cout<<a[i]<<" ";
if(max < a[i])
max = a[i];
}
for(int i=0; i<n; i++)
{
if(a[i] == max)
sum+=1;
}
cout<<"The maximum number is found "<< max << "times"<<endl;
return 0;
}
Объяснение: