spielplatz:student:42:cpisine_rush1
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| spielplatz:student:42:cpisine_rush1 [2026/02/14 14:06] – [Error Ouput to the User] itbs | spielplatz:student:42:cpisine_rush1 [2026/02/14 19:29] (aktuell) – [Functiondefinition] itbs | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== Rush 01 with 3D Boxes ====== | ||
| + | |||
| + | - Messagees for the User handeld in Main | ||
| + | - call function with first String (to validate Numberset) | ||
| + | - If not correct abort to Main return (1); | ||
| + | - function for loop and split the input by spaces | ||
| + | - function that read Characters and see it as Digit | ||
| + | - (or – Recursive /10 %10 for grater then Zero as positiv unsigned int) | ||
| + | - can we validate the Arraysize default 4x4x4Grid and SetSitzeFunc | ||
| + | - optional (3. map sizes up to 9x9) | ||
| + | - create int box3dmatrix[][][] and call next step | ||
| + | - startsolve(int box3dmatrix[][][]) | ||
| + | - easy Checks | ||
| + | - loop through the Matrix to validate all Inputs | ||
| + | - only solution is full validate call next | ||
| + | - loop through the Matrix and write the Input Digits to the Terminal | ||
| + | - back to main with return (0); | ||
| + | |||
| + | ==== validated Ouput to the User ==== | ||
| + | < | ||
| + | ./rush01 "4 3 2 1 1 2 2 2 4 3 2 1 1 2 2 2" | cat -e | ||
| + | 1 2 3 4$ | ||
| + | 2 3 4 1$ | ||
| + | 3 4 1 2$ | ||
| + | 4 1 2 3$ | ||
| + | </ | ||
| + | |||
| + | ==== Error Ouput to the User ==== | ||
| + | |||
| + | * not just one Inputstring | ||
| + | * "Run with only one argument in double \" quotation !!\n" | ||
| + | * no parameter or to many | ||
| + | * "run ./rush01 \"4 3 2 1 1 2 2 2 4 3 2 1 1 2 2 2\" | ||
| + | * Validate and Solve Error (no Solution output) | ||
| + | * "Error in given Data. 4x4 Grid please!\n" | ||
| + | * 2D Terminal output try to reuse the "loop through the Matrix" | ||
| + | |||
| + | ==== Functiondefinition ==== | ||
| + | |||
| + | helper func | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | - '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | [[spielplatz: | ||