Skip to content

Instantly share code, notes, and snippets.

#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;
#include <iostream>
using namespace std;
int main()
{
const int n = 20;
char arr[n];
srand(time(0));
for (int i = 0; i < n; ++i)
#include <iostream>
using namespace std;
int main() {
const int size = 15;
int arr[size];
srand(time(0));
#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <algorithm>
using namespace std;
// Функція для заповнення масиву рандомними значеннями
void fillArray(vector<int>& arr, int size, int min, int max) {
#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)
{
#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)
{
#include <iostream>
using namespace std;
int main() {
const int SIZE = 50;
int array1[SIZE], array2[SIZE];
int insertionIterations = 0, shellIterations = 0;
// Генерация одинаковых массивов
srand(time(0));
#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];
}
# Користувач вводить число
n = int(input("Введіть число: "))
# Кількість елементів у масиві
size = int(input("Введіть розмір масиву: "))
# Ініціалізація масиву
array = [0] * size
# Заповнення масиву
#include <iostream>
using namespace std;
int main() {
int n; // Розмір масиву
cout << "Введіть розмір масиву: ";
cin >> n;
int array[n]; // Створення масиву заданого розміру