Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdlib.h> // в этом файле содержатся rand и srand
- #include<time.h> // в этом файле содержится функция time
- #include <iostream>
- using namespace std;
- int main() {
- srand(time(NULL));
- setlocale(LC_ALL, "ru");
- int arr[3][4];
- int begin;
- cout << "Введите число: ";
- cin >> begin;
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 4; j++) {
- arr[i][j] = begin++;
- cout << arr[i][j] << "\t";
- }
- cout << endl;
- }
- cout << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment