العربية
فتح في Telegram

سلسلة الرسالة #29809

16 رسالة · –
M
ملف
-2147483648_-212719.jpg · 24 ك.ب · انقر للعرض
        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. ح
            #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. ح
            #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; }

خلاصة عامة مفتوحة من فهرس البحث ChatCrawler — «Google لـ Telegram العام»؛ تُحدَّث كلما زحفنا إلى المجتمع. الأوقات بتوقيت UTC.

محتوى عام فقط، وAPI Telegram الرسمي. عن المشروع · الأسئلة الشائعة · حدود الفهرس · إزالة صفحة · الدليل · بحث · كيف نحسب