[ create a new paste ] login | about

Link: http://codepad.org/jwooB9Ab    [ raw code | output | fork ]

C++, pasted on Oct 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
using namespace std;
 
int main()
{
    double a, b, u, v;
    a = 3.45;b = -4.11;
 
    u = min(a, b),v = min(a*b, a + b),min(u + v*v, 3.14);
    cout<<u<<" "<<v<<endl;
    cin.get();
    return 0;
}


Output:
1
-4.11 -14.1795


Create a new paste based on this one


Comments: