I already worked out the random shuffle, it's all on the post 32. All I need now is a way to add those 2 un-swapped guys to the array (I've tried strcat, but I'm pretty sure it didn't work), and then...
Type: Posts; User: Ferreres93
I already worked out the random shuffle, it's all on the post 32. All I need now is a way to add those 2 un-swapped guys to the array (I've tried strcat, but I'm pretty sure it didn't work), and then...
Okay, there are 9 bodies, ALL of them with the minds swapped, thus the enfasis in the shuffle. Once shuffled, you may add TWO unshuffled people to solve the equation. I've no idea about the SG...
Also, no student can learn from a master who wont listen to him.
FYI, I managed to shuffle the minds just fine with a variation of the deck shuffle algorithm. Now I just need an algorithm to follow...
Okay, so I tried with the shuffle deck code, and it pretty much works, but when it's going to return the scrambled array, it stops working. Can you see anything wrong with the code?
...
Yes, I do read your suggestions, I just forgot, and was looking for a way to delete the comment, sorry. Now I'm trying to do pretty much the same thing by changing a bit the card shuffle code you...
Okay, scratch what I said before. I just had an idea, but I wanted to run it through you before I started trying it out.
What I thought was this, more or less:
#include<stdio.h>...
Okay, so far, I've come up with this (and since my partner is pretty much only doing what I tell him to do, my brains are about to explode by this point). I've Input the 9 names into an string array...
Okay, now, before scrambling, I decided to let the user input the names of each character of the swapping with this code:
main (void) {
int N;
char n1 [10],n2 [10],n3 [10],n4 [10],n5 [10],n6...
Okay, I created this array for the names:
main () {int N;
char Names [9] [15] = {"Zoidberg", "Fry", "Leela", "Profesor", "Bender", "Amy", "Hermes", "Washbucket", "Emperor Nikolai"};
scanf...
Okay, I think I pretty much solved it, but I still can't figure out how to stop the changes from repeating a bodyswap. Can anybody help me with that? Any ideas?
I know, I didn't ask for a finished code. I just pointed out that that wasn't what we needed. We have an algorithm that generates random numbers, which we plan on using in place of names, but we...
Thanks, but this isn't really what I need. I need to be able to input the names, swap them at random, display the changes, and then display, step by step, the changes needed to go back to normal,...
Recently, on my programming course my teacher has assigned us to write a program in C that compiles the Futurama Theorem, displayed in the chapter Prisoner of Benda. The theorem itsself is a...