initial
This commit is contained in:
commit
2802401eee
79 changed files with 2650 additions and 0 deletions
22
1sem/programming basics/z3/9.cpp
Normal file
22
1sem/programming basics/z3/9.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// pb_z3_9.cpp
|
||||
// Горбацевич Андрей
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include<algorithm>
|
||||
using namespace std;
|
||||
|
||||
float min_or_max(float a, float b, float c)
|
||||
{
|
||||
if (a > 0.5)
|
||||
return max(b, c);
|
||||
else
|
||||
return min(b, c);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
float a, b, c;
|
||||
cin >> a >> b >> c;
|
||||
float d = min_or_max(a, b, c);
|
||||
cout << d << endl;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue