Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#include <iostream>
#include <time.h>
#include "MT.h"
using namespace std;
//デフォルト引数の使用例
void show(double a = 0, double b = 0) {
cout << "a: " << a << endl;
cout << "b: " << b << endl;
for (int i = 0; i < 22; i++) cout << "*";
cout << "\n";
}
int main()
{
init_genrand((unsigned)time(NULL));
show();
show(genrand_real3());
show(genrand_real3(), genrand_real3());
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment