#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <fstream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv)
{
int tab[30];
srand(time(NULL));
for(int i=0;i<30;i++)
{
tab[i]=rand()%90+10;
cout<<" "<<tab[i];
}
int z=0;
for (int a = 0; a < 30; a = a + 1)
{
for (int j = 0; j < 30; j++)
{
if (tab[a] == tab[j])
{
z=z+1;
}
}
cout << tab[a] << "wystapilo" << z << "razy"<<endl;
z=0;
}
return 0;
}
alogrytm sprawdza ile razy wyspaiła liczba nw jak go przekstałcici by sprawdzał od uzkownika