Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
653 B
1
Indexable
Never

#include <iostream>
using namespace std;

int main()
{
	int mas[5], mas2[5];
	int summ=0, max, min, count = 0, a,count2=0;
	for (int i = 0; i < 5; i++) {
		cin >> mas[i];
	}
	for (int i = 0; i < 5; i++) {
		summ +=mas[i];
	}
	cout << summ << endl;
	max = mas[0];
	min = mas[0];

	for (int i = 0; i < 5; i++) {
		if (max < mas[i]) {
			max = mas[i];
			count++;
			cout << max << endl;

		}
		if (min > mas[i]) {
			min = mas[i];
			cout << min << endl;
		}
	}
	cin >> a;
	for (int i = 0; i < 5; i++) {
		if (mas[i] == a) {
			count2++;
	 }
	}
	for (int i = 0; i < 5; i++) {
		mas[i] = mas2[i];
	}





}
 
Leave a Comment