Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <time.h>
- #include <cstdlib>
- static const char tabelka[] =
- "abcdefghijklmnopqrstuvwxyz";
- int stringLength = sizeof(tabelka) - 1;
- char randomowa_literka(){
- return tabelka[rand() % stringLength];
- }
- int main()
- {
- srand(time(0));
- std::string Str;
- for(unsigned int i = 0; i < 10; ++i)
- {
- Str +=randomowa_literka();
- std::cout << Str;
- }
- if (Str['c']>Str['a'])
- {
- std::cout<<"elo"<<std::endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement