Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <cstdlib>
- #include <string>
- using namespace std;
- int main()
- {
- srand(time(NULL));
- int n = ((rand() % 4) + 2) * 2;
- char consonanti[16] = {'b','c','d','f','g','h','l','m','n','p','q','r','s','t','v','z'};
- char vocali[5] = {'a','e','i','o','u'};
- string nome[n];
- cout << endl;
- for( int i = 0; i < n; i++)
- {
- if( i % 2 == 0 )
- {
- nome[i] += consonanti[rand()%16];
- }
- else
- {
- nome[i] += vocali[rand()%5];
- }
- cout << nome[i];
- }
- cout << endl << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement