prosze :)
// copyright [email protected]#include <iostream>#include <time.h>#include <cstdlib>using namespace std;void wypelnia (int *tab){ for(int i=0;i<10;i++) //wypełnianie tablicy {tab[i] =(rand()%1000)+1; }}void odczyt(int *tab){ for(int i=0;i<10;i++) //odczyt tablicy { cout<<i+1<<" element tablicy :"<<tab[i]<<endl; }}int main(){ srand ( static_cast < unsigned int >(time(NULL))); int tab[9];wypelnia(tab);odczyt(tab); return 0;}
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
prosze :)
// copyright [email protected]
#include <iostream>
#include <time.h>
#include <cstdlib>
using namespace std;
void wypelnia (int *tab)
{
for(int i=0;i<10;i++) //wypełnianie tablicy
{
tab[i] =(rand()%1000)+1;
}
}
void odczyt(int *tab)
{
for(int i=0;i<10;i++) //odczyt tablicy
{
cout<<i+1<<" element tablicy :"<<tab[i]<<endl;
}
}
int main()
{
srand ( static_cast < unsigned int >(time(NULL)));
int tab[9];
wypelnia(tab);
odczyt(tab);
return 0;
}