From 14af5f6e8e228d0b50853aabd61776ba6a9e0fb6 Mon Sep 17 00:00:00 2001 From: fdai7731 Date: Thu, 8 Feb 2024 02:10:20 +0100 Subject: [PATCH] function generiereZufallszahl --- src/main/c/Mathe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/c/Mathe.c b/src/main/c/Mathe.c index 6b752d1..64c1513 100644 --- a/src/main/c/Mathe.c +++ b/src/main/c/Mathe.c @@ -56,7 +56,12 @@ int generiereZufallszahl(int min, int max) { - +//19 +char generiereZufallsOperator() { + char operatoren[] = {'+', '-', '*', '/'}; + int index = rand() % 4; + return operatoren[index]; +}