Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- #include <vector>
- #include <fstream>
- using namespace std;
- void GeneretarTrojek(string nazwapliku, int n, int min, int max)
- {
- cout << nazwapliku << endl;
- cout << n << endl;
- int liczba1;
- int liczba2;
- int liczba3;
- srand(time(NULL));
- liczba1 = rand() % 7 + 2;
- liczba2 = rand() % 7 + 2;
- liczba3 = rand() % 7 + 2;
- for (int i = 1; i <= n; i++)
- {
- cout << liczba1 << ";" << liczba2 << ";" << liczba3<<endl;
- }
- }
- int main()
- {
- GeneretarTrojek("Trojki", 5, 2, 8);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement