diff options
| author | Carlos Maiolino <[email protected]> | 2025-09-06 09:26:21 +0200 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-09-06 09:26:21 +0200 |
| commit | 973e27b243ea7f12b6743894465c67a4a6a87eb2 (patch) | |
| tree | 006a2d9fc8f86b4914499302325fbcaa3941e17c /C/HF/shuffle.c | |
| parent | 736967952470e740781c95cf5afb7e705ec59030 (diff) | |
Move some other code here
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'C/HF/shuffle.c')
| -rw-r--r-- | C/HF/shuffle.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/C/HF/shuffle.c b/C/HF/shuffle.c new file mode 100644 index 0000000..eb11bf9 --- /dev/null +++ b/C/HF/shuffle.c @@ -0,0 +1,14 @@ +#include <stdio.h> + +int main() +{ + char cards[] = "JQK"; + char a_card = cards[2]; + cards[2] = cards[1]; + cards[1] = cards[0]; + cards[0] = cards[2]; + cards[2] = cards[1]; + cards[1] = a_card; + puts(cards); + return 0; +} |
