This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| double y= pow(3.0,7) + 7 * 7; | |
| cout << "y=" << y << endl; | |
| for (double x = 1; x <= 10; x += 1.3); | |
| { | |
| cout << "x =" << x << endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| const int n = 20; | |
| char arr[n]; | |
| srand(time(0)); | |
| for (int i = 0; i < n; ++i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int size = 15; | |
| int arr[size]; | |
| srand(time(0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #include <cstdlib> | |
| #include <ctime> | |
| #include <algorithm> | |
| using namespace std; | |
| // Функція для заповнення масиву рандомними значеннями | |
| void fillArray(vector<int>& arr, int size, int min, int max) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int SIZE = 1000; | |
| int array[SIZE]; | |
| int max = 30; | |
| int min = -30; | |
| for (int i = 0; i < SIZE; ++i) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int SIZE = 1000; | |
| int array[SIZE]; | |
| int max = 30; | |
| int min = -30; | |
| for (int i = 0; i < SIZE; ++i) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int SIZE = 50; | |
| int array1[SIZE], array2[SIZE]; | |
| int insertionIterations = 0, shellIterations = 0; | |
| // Генерация одинаковых массивов | |
| srand(time(0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| const int size = 10; | |
| int arr[size]; | |
| cout << "Введите " << size << " элементов массива:" << endl; | |
| for (int i = 0; i < size; i++) { | |
| cin >> arr[i]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Користувач вводить число | |
| n = int(input("Введіть число: ")) | |
| # Кількість елементів у масиві | |
| size = int(input("Введіть розмір масиву: ")) | |
| # Ініціалізація масиву | |
| array = [0] * size | |
| # Заповнення масиву |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int n; // Розмір масиву | |
| cout << "Введіть розмір масиву: "; | |
| cin >> n; | |
| int array[n]; // Створення масиву заданого розміру |
OlderNewer