Skip to content

Instantly share code, notes, and snippets.

@lackofdream
Created May 16, 2015 06:17
Show Gist options
  • Select an option

  • Save lackofdream/8d3452eab5375875c276 to your computer and use it in GitHub Desktop.

Select an option

Save lackofdream/8d3452eab5375875c276 to your computer and use it in GitHub Desktop.
!@# Generator
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <cstring>
using namespace std;
char s[]="!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*!@#$%^&*";
int main()
{
srand(time(NULL));
int len = strlen(s);
int a;
cin >> a;
for (int i=0;i<a;i++)
{
cout << s[rand()%len];
rand();
rand();
}
cout << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment