Challenge: Generate and Transform Sequence
Завдання
Swipe to start coding
Implement two functions:
generateSequence: takes an integernand returns astd::vector<int>of sizenfilled with random values. Usestd::generateto fill the vector. Generate random integers between 1 and 100 (inclusive).squareElements: takes aconst std::vector<int>&and returns a new vector where each element is the square of the corresponding input value. Usestd::transformfor this operation.
Рішення
solution.cpp
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 6
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Suggested prompts:
Can you explain this in simpler terms?
What are the main takeaways from this?
Can you give me a real-world example?
Awesome!
Completion rate improved to 6.67
Challenge: Generate and Transform Sequence
Свайпніть щоб показати меню
Завдання
Swipe to start coding
Implement two functions:
generateSequence: takes an integernand returns astd::vector<int>of sizenfilled with random values. Usestd::generateto fill the vector. Generate random integers between 1 and 100 (inclusive).squareElements: takes aconst std::vector<int>&and returns a new vector where each element is the square of the corresponding input value. Usestd::transformfor this operation.
Рішення
solution.cpp
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 6
single