tasodifiy elementlar ro'yxati va eng kichik ko'paytma

DOCX 6 стр. 784,0 КБ Бесплатная загрузка

Предварительный просмотр (5 стр.)

Прокрутите вниз 👇
1 / 6
o’zbekiston respublikasi raqamli texnologiyalar vazirligi muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalar universiteti ma’lumotlar tuzilmasi va algoritmlar fanidan 7-amaliy topshiriq toshkent – 2024 14- variant #include #include #include #include #include using namespace std; void tasodifiyroyxat(list & lst, int size, int minvalue, int maxvalue) { srand(time(0)); for (int i = 0; i & lst) { for (int num : lst) { cout & lst) { vector numbers(lst.begin(), lst.end()); int n = numbers.size(); if (n == 0) return 0; int maxlength = 1, currentlength = 1, product = 1; int currentproduct = numbers[0]; for (int i = 1; i maxlength) { maxlength = currentlength; product = currentproduct; } currentlength = 1; currentproduct = numbers[i]; } } if (currentlength > maxlength) { product = currentproduct; } return product; } int main() { list numbers; int size = 10, minvalue = -10, maxvalue = 10; tasodifiyroyxat(numbers, size, minvalue, maxvalue); cout << "royxat elementlari: "; ekrangachiqish(numbers); …
2 / 6
tasodifiy elementlar ro'yxati va eng kichik ko'paytma - Page 2
3 / 6
tasodifiy elementlar ro'yxati va eng kichik ko'paytma - Page 3
4 / 6
tasodifiy elementlar ro'yxati va eng kichik ko'paytma - Page 4
5 / 6
tasodifiy elementlar ro'yxati va eng kichik ko'paytma - Page 5

Хотите читать дальше?

Скачайте все 6 страниц бесплатно через Telegram.

Скачать полный файл

О "tasodifiy elementlar ro'yxati va eng kichik ko'paytma"

o’zbekiston respublikasi raqamli texnologiyalar vazirligi muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalar universiteti ma’lumotlar tuzilmasi va algoritmlar fanidan 7-amaliy topshiriq toshkent – 2024 14- variant #include #include #include #include #include using namespace std; void tasodifiyroyxat(list & lst, int size, int minvalue, int maxvalue) { srand(time(0)); for (int i = 0; i & lst) { for (int num : lst) { cout & lst) { vector numbers(lst.begin(), lst.end()); int n = numbers.size(); if (n == 0) return 0; int maxlength = 1, currentlength = 1, product = 1; int currentproduct = numbers[0]; for (int i = 1; i maxlength) { maxlength = currentlength; product = currentproduct; } currentlength = 1; currentproduct = numbers[i]; } } if (currentlength > maxlength) { product = …

Этот файл содержит 6 стр. в формате DOCX (784,0 КБ). Чтобы скачать "tasodifiy elementlar ro'yxati va eng kichik ko'paytma", нажмите кнопку Telegram слева.

Теги: tasodifiy elementlar ro'yxati v… DOCX 6 стр. Бесплатная загрузка Telegram