From edaeb98d0a6f80b4e40fd8a64a475baef40eb2cc Mon Sep 17 00:00:00 2001 From: fdai7727 Date: Thu, 25 Jan 2024 15:29:47 +0100 Subject: [PATCH] =?UTF-8?q?Implementation=20der=20zuf=C3=A4lligen=20Comput?= =?UTF-8?q?erauswahl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/Tim/SchereSteinPapier.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/c/Tim/SchereSteinPapier.c b/src/main/c/Tim/SchereSteinPapier.c index d71250a..72d76fc 100644 --- a/src/main/c/Tim/SchereSteinPapier.c +++ b/src/main/c/Tim/SchereSteinPapier.c @@ -1,5 +1,7 @@ #include "SchereSteinPapier.h" #include +#include +#include void schereSteinPapier() @@ -19,7 +21,9 @@ void schereSteinPapier() } else if(user == 1 || user == 2 || user == 3) { - //do something + srand(time(NULL)); + com = rand() % 3 + 1; + printf("%d\n",com); } else {