Untitled
unknown
plain_text
3 years ago
555 B
4
Indexable
#include <iostream>
using namespace std;
int main(){
int a[10], max, min, sum=0,sr;
cout << "Vvedite 10 chisel: ";
for (int i = 0; i < 10; i++){
cin >> a[i];
}
max=min=a[0];
for (int i = 0; i < 10; i++){
if(a[i]>max){
max=a[i];
}
if(a[i]<min){
min=a[i];
}
}
for(int i = 0; i < 10; i++){
sum = sum + a[i];
}
sr=sum/10;
cout << "Max: " << max << endl << "Min: " << min << endl << "Srednee arifmetichiskoe: " << sr;
}Editor is loading...