From 8afce67efadd0f6e1496cab71c8b59b52300517f Mon Sep 17 00:00:00 2001 From: Lucas Heil Date: Wed, 7 Feb 2024 17:08:26 +0100 Subject: [PATCH] Commit 2 code --- src/main/c/sudoku.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/c/sudoku.c b/src/main/c/sudoku.c index 8e7d480..a065a5d 100644 --- a/src/main/c/sudoku.c +++ b/src/main/c/sudoku.c @@ -1,3 +1,8 @@ + + + + + #include #include #include @@ -13,6 +18,8 @@ int selected_level; void startSudoku(); //is instead of main +void availableLevelsFunction(int difficulty); + void startSudoku() { int grid[SIZE][SIZE]; @@ -33,7 +40,7 @@ void startSudoku() { difficulty = input[0] - '0'; // Convert the first character to an integer if ((difficulty >= 1 && difficulty <= 3) && input[1] == '\0') { - printf("Input is correct"); + availableLevelsFunction(difficulty); } else { printf("Invalid input. Please enter a number between 1 and 3.\n"); } @@ -41,6 +48,11 @@ void startSudoku() { } } +void availableLevelsFunction(int difficulty) { + printf("\nAvailable Levels for Difficulty %d:\n", difficulty); + +} + int main(){ startSudoku(); return 0;