Ответ:
C++
Объяснение:
#include <iostream>
using namespace std;
int main()
{
int *arr;
int count;
cout << "Input count numbers: ";
cin >> count;
arr = new int[count];
int maxC = -350000000;
int minC = 350000000;
cout << "Input numbers: " << endl;
for(int i = 0;i < count;i++) {
cin >> arr[i];
}
if (arr[i] < minC) {
minC = arr[i];
if(maxC < arr[i]) {
maxC = arr[i];
cout << "Max: " << maxC << " Min: " << minC;
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
C++
Объяснение:
#include <iostream>
using namespace std;
int main()
{
int *arr;
int count;
cout << "Input count numbers: ";
cin >> count;
arr = new int[count];
int maxC = -350000000;
int minC = 350000000;
cout << "Input numbers: " << endl;
for(int i = 0;i < count;i++) {
cin >> arr[i];
}
for(int i = 0;i < count;i++) {
if (arr[i] < minC) {
minC = arr[i];
}
if(maxC < arr[i]) {
maxC = arr[i];
}
}
cout << "Max: " << maxC << " Min: " << minC;
return 0;
}