summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mcmthesis/code
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-01-21 23:43:19 +0000
committerKarl Berry <karl@freefriends.org>2015-01-21 23:43:19 +0000
commitc9c2fdfb6c939de3cc60075093a9489947a08536 (patch)
tree58928f2b9a76eb5555bfb026345343bda490a1be /Master/texmf-dist/doc/latex/mcmthesis/code
parent9a3f6ed53beeeb860cce8e9c9763ec14455823b4 (diff)
mcmthesis (21jan15)
git-svn-id: svn://tug.org/texlive/trunk@36111 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/mcmthesis/code')
-rw-r--r--Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-matlab1.m15
-rw-r--r--Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-sudoku.CPP41
2 files changed, 56 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-matlab1.m b/Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-matlab1.m
new file mode 100644
index 00000000000..f03f49fa40f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-matlab1.m
@@ -0,0 +1,15 @@
+function [t,seat,aisle]=OI6Sim(n,target,seated)
+pab=rand(1,n);
+for i=1:n
+ if pab(i)<0.4
+ aisleTime(i)=0;
+ else
+ aisleTime(i)=trirnd(3.2,7.1,38.7);
+ end
+end
+
+
+
+
+
+ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-sudoku.CPP b/Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-sudoku.CPP
new file mode 100644
index 00000000000..deedc9f9b0e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/mcmthesis/code/mcmthesis-sudoku.CPP
@@ -0,0 +1,41 @@
+//============================================================================
+// Name : Sudoku.cpp
+// Author : wzlf11
+// Version : a.0
+// Copyright : Your copyright notice
+// Description : Sudoku in C++.
+//============================================================================
+
+#include <iostream>
+#include <cstdlib>
+#include <ctime>
+
+using namespace std;
+
+int table[9][9];
+
+int main() {
+
+ for(int i = 0; i < 9; i++){
+ table[0][i] = i + 1;
+ }
+
+ srand((unsigned int)time(NULL));
+
+ shuffle((int *)&table[0], 9);
+
+ while(!put_line(1))
+ {
+ shuffle((int *)&table[0], 9);
+ }
+
+ for(int x = 0; x < 9; x++){
+ for(int y = 0; y < 9; y++){
+ cout << table[x][y] << " ";
+ }
+
+ cout << endl;
+ }
+
+ return 0;
+} \ No newline at end of file