Español
Abrir en Telegram

Hilo Mensaje #29809

16 mensajes · –
M
Archivo
-2147483648_-212719.jpg · 24 KB · haz clic para mostrar
        1. M
          Harakat qb koʻrdm . Internettanam qarabam koʻrdm oʻxshamadi
        1. M
          Tasodifiy n sonli stekni to‘ldiring va shu stekdagi birinchi manfiy elementlarni toping.
          1. C
            #include <iostream> #include <stack> #include <time.h> #include <cctype> using namespace std; int main() { srand(time(0)); stack<int> s; int n; cout << "Enter the number of elements: "; cin >> n; // Stacking the elements for(int i=0; i<n; i++){ int element; cout << "Enter element " << i+1 << ": "; element=rand()%100; s.push(element); } // Finding the first negative element while(!s.empty()){ int element = s.top(); s.pop(); if(element < 0){ cout << "The first negative element is: " << element << endl; return 0; } } cout << "There is no negative element in the stack" << endl; return 0; }
            1. M
              Qaren bunisida tasodifiy sonla bilan dvottiku ushanga random qilib ishlanishi kerakmasmi.
        2. M
          Valarray sinfidan foydalanib, massivning barcha elementlari uchun dekrementini (prefiks (--i) va postfiks (i--) lar uchun) amalga oshiring
          1. C
            #include <iostream> #include <valarray> using namespace std; int main() { valarray<int> arr = {1, 2, 3, 4, 5}; // Dekrementation using prefix (--i) cout << "Prefix decrementation: "; for(int i=0; i<arr.size(); i++){ cout << --arr[i] << " "; } cout << endl; // Resetting array to original values arr = {1, 2, 3, 4, 5}; // Dekrementation using postfix (i--) cout << "Postfix decrementation: "; for(int i=0; i<arr.size(); i++){ cout << arr[i]-- << " "; } cout << endl; return 0; }

Un feed público abierto del índice de búsqueda ChatCrawler — el “Google del Telegram público”; se actualiza a medida que se rastrea la comunidad. Las horas se muestran en UTC.

Solo contenido público, API oficial de Telegram. Acerca de · Preguntas frecuentes · Límites del índice · Eliminar una página · Catálogo · Búsqueda · Cómo contamos