Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- float min(float a, float b){
- if(a < b) return a;
- else return b;
- }
- int main()
- {
- float a,b;
- cout << "Введите a,b:"<< endl;
- cin >> a >> b;
- float u = min(a,b);
- float v = min(a*b, a+b);
- float f = min(a+pow(b,2),3.14);
- cout << "a = " << a << " b = " << b << endl;
- cout << "u = min(a,b) = " << u << endl
- << "v = min(a*b, a+b) = " << v << endl
- << "f = min(a+pow(b,2),3.14) = " << f << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement