No, not really. If you set card1 to a random number from 1-13, it will stay at that number until you change it to something else. Setting card1=(rand()%13)+1 evaluates that expression ONCE at that point in time; it's not like a spreadsheet where all values are recalculated every time something changes, for example card1 doesn't get a new value when the card2 expression is evaluated. You'd really need to post complete (but minimal) code that shows what's going wrong.
Also each time you call rand() it reseeds itself, so you should get a different random number each time. Let's try:
for (int i=0; i<10; i++) printf("%d ",rand());
41 18467 6334 26500 19169 15724 11478 29358 26962 24464
Not seeded so I get the same sequence every time (Visual Studio 2005).
Adding srand(time(0)); to reseed it according to the current time (which only needs doing once, at the start of the program):
9037 8708 18282 21513 21348 21152 22071 7170 7069 8644
and a different sequence each time.
Anyway, when you move on to a new project, don't delete code, just bung it somewhere safe. That way you can always revisit it later when you have an idea about it (maybe you'll have an idea that cracks open the reason you abandoned the project).