hunt 님이 쓰신 글 :
:
: #include <iostream>
: #include <iomanip>
: #include <cstdlib>
: using namespace std;
:
: int main()
: {
: int i1 =rand();
: int i2 = rand();
: cout << "Given " << setw(5) << i1 << "and" << setw(5) << i2 << ":" << max(i1,i2) << " is larger\n";
: float f1 = rand()/3.3;
: float f2 = rand()*6.7;
: cout << " \nGiven " << setw(5) << f1 << "and" << setw(5) << f2 << ":" << max(f1,f2) << " is larger\n";
: return 0;
: }
본문엔 빠져있지만
#include <algorithm> 를 썼겠죠
|