#include <iostream>
int main()
{
using namespace std;
setlocale(LC_ALL, "ru");
int arr[3];
cout << "Введите 3 числа: " << endl;
for (int i = 0; i < 3; i++)
cin >> arr[i];
cout << (arr[0] < arr[1] ? (arr[0] < arr[2] ? arr[0] : arr[2]) : (arr[1] < arr[2] ? arr[1] : arr[2]));
return 0;
}
int main(){
int a = 10;
int b = 30;
int c = 15;
if(a>b && a>c) cout<<a;
if(b>a && b>c) cout<<c;
if(c>a && c>b) cout<<b;
Объяснение:
#include <iostream>
int main()
{
using namespace std;
setlocale(LC_ALL, "ru");
int arr[3];
cout << "Введите 3 числа: " << endl;
for (int i = 0; i < 3; i++)
cin >> arr[i];
cout << (arr[0] < arr[1] ? (arr[0] < arr[2] ? arr[0] : arr[2]) : (arr[1] < arr[2] ? arr[1] : arr[2]));
return 0;
}
#include <iostream>
using namespace std;
int main(){
int a = 10;
int b = 30;
int c = 15;
if(a>b && a>c) cout<<a;
if(b>a && b>c) cout<<c;
if(c>a && c>b) cout<<b;
}
Объяснение: