Untitled

 avatar
unknown
plain_text
4 years ago
608 B
5
Indexable
#include <iostream>
#include <time.h>
#include <windows.h>
#include <conio.h>
 
using namespace std;
 
int main()
{
    int liczba;
 
    cout<<"Ile znakow ma miec twoje haslo? ";
    int ileZ;
    cin>>ileZ;
 
    cout<<"Ile hasel chcesz wygenerowac? ";
    int ileH;
    cin>>ileH;
 
    srand(time(NULL));
 
    for(int i=1; i<=ileH;i++)
    {
        for(int j=0; j<=ileZ; j++)
        {
            liczba=rand()%256+1;
            cout<<static_cast<char>(liczba);
            _getch();
        }
        cout<<i<<". ";
        cout<<endl;
    }
    
    return 0;
}
 
Editor is loading...