English
Open in Telegram

Message#include <iostream>

19 April 2023
.
#include <iostream> #include <set> #include <string> int main() { std::set<std::string> evenLengthSet; std::multiset<std::string> oddLengthSet; std::multiset<std::string> allSet; // Juft uzunlikdagi elementdan iborat to'plamni yaratish std::string evenLengthArray[] = {"one", "two", "three", "four", "five", "six"}; int evenLengthArraySize = sizeof(evenLengthArray) / sizeof(evenLengthArray[0]); // Juft uzunlikdagi elementlarni to'plamga qo'shish for (int i = 0; i < evenLengthArraySize; ++i) { if (evenLengthArray[i].length() % 2 == 0) { evenLengthSet.insert(evenLengthArray[i]); } } // Toq uzunlikdagi elementdan iborat to'plamni yaratish std::string oddLengthArray[] = {"apple", "banana", "orange", "pear", "kiwi"}; int oddLengthArraySize = sizeof(oddLengthArray) / sizeof(oddLengthArray[0]); // Toq uzunlikdagi elementlarni to'plamga qo'shish for (int i = 0; i < oddLengthArraySize; ++i) { if (oddLengthArray[i].length() % 2 != 0) { oddLengthSet.insert(oddLengthArray[i]); } } // Barcha elementlarni bir to'plamga qo'shish allSet.insert(evenLengthSet.begin(), evenLengthSet.end()); allSet.insert(oddLengthSet.begin(), oddLengthSet.end()); // Ikki to'plamdan ham bir xil qiymatli elementlarni o'chirib tashlash for (std::string s : evenLengthSet) { oddLengthSet.erase(s); allSet.erase(s); } // Hosil qilingan to'plamlarni ekranga chiqarish std::cout << "Even Length Set: "; for (std::string s : evenLengthSet) { std::cout << s << " "; } std::cout << std::endl; std::cout << "Odd Length Set: "; for (std::string s : oddLengthSet) { std::cout << s << " "; } std::cout << std::endl; std::cout << "All Set: "; for (std::string s : allSet) { std::cout << s << " "; } std

Nearby in the feed

SSTUDENTOliy matematikadan ishlaydiganlar bormi🪐🪐🍃Tashlangchi
this message
..#include <iostream> using namespace std; int main() { const int width = 10; const int height = 6; for (int row = 1; row <= height / 2; ++row) { for (int col = 1..Dasturlash 2 C C++ Python Informatika Test Kimda boʻlsa lichga 💸
CC++ vs PythonC++ vs Python@cpp_vs_python · group · Tech
114members39 409messages in the index
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · Index limits · Remove a page · Catalog · Search · How we count