http://www.cplusplus.com/forum/beginner/7445/
#include <cmath>
#include <iostream>
#include <limits>
#include <cstdlib>
#include <ctime>
using namespace std;
main ()
{
double AOD;
srand((unsigned)time(NULL));
AOD=((double) rand() / (RAND_MAX+1)) ;
cout<<endl<<AOD;
std::cout <<" Press ENTER to continue...";
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
return(0);
}
'Programming' 카테고리의 다른 글
Classic Nintendo Games are (NP-)Hard (0) | 2012.07.09 |
---|---|
Java Decompiler jad 이클립스와 연동 (0) | 2012.07.05 |
(Java) Determining If a File or Directory Exists (0) | 2012.07.03 |
(Java) Computing Elapsed Time (0) | 2012.07.03 |
Learn Objective-C (0) | 2012.07.03 |