Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <time.h>
- using namespace std;
- int main()
- {
- //Zadanie 1
- cout << "~~~Zadanie 1~~~" << endl;
- /*{
- cout << "od 0 do 10:" << endl;
- int tab[10];
- srand(time(NULL));
- for (int i = 0; i < 10; i++)
- {
- tab[i] = rand() % 10 + 0;
- cout << tab[i] << endl;
- }
- return 0;
- }*/
- /*{
- cout << "od 1 do 15:" << endl;
- int tab[10];
- srand(time(NULL));
- for (int i = 0; i < 10; i++)
- {
- tab[i] = rand() % 15 + 1;
- cout << tab[i] << endl;
- }
- return 0;
- }*/
- {
- cout << "od -10 do 10:" << endl;
- int tab[10];
- srand(time(NULL));
- for (int i = 0; i < 10; i++)
- {
- tab[i] = ((rand() % 10) - 10);
- cout << tab[i] << endl;
- }
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement