Challenge: Vector Operations in Practice
Tarea
Swipe to start coding
Implement two functions:
- Define a function named
createSequencethat takes an integer argumentnand returns astd::vector<int>containing the numbers from1ton(inclusive), in order; - Define a function named
sumVectorthat takes aconst std::vector<int>&as an argument and returns the sum of its elements as an integer.
Solución
solution.cpp
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 2
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 6.67
Challenge: Vector Operations in Practice
Desliza para mostrar el menú
Tarea
Swipe to start coding
Implement two functions:
- Define a function named
createSequencethat takes an integer argumentnand returns astd::vector<int>containing the numbers from1ton(inclusive), in order; - Define a function named
sumVectorthat takes aconst std::vector<int>&as an argument and returns the sum of its elements as an integer.
Solución
solution.cpp
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 2
single