Want language are you using? If it's C++, the standard library already has this function written for you.
Code:
#include <algorithm>
int main( void )
{
int a[52]={...}
std::random_shuffle( a, a+52 );
return 0;
}