Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Modify Array Values | Using Arrays in Programs
C++ Arrays

bookChallenge: Modify Array Values

Tarefa

Swipe to start coding

Write a function that modifies every element of an array by doubling its value. Follow these requirements:

  • Declare and initialize the array in main;
  • Pass the array and its size to a function;
  • Use a loop to access each element;
  • Modify the array in place;

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 4
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Suggested prompts:

Can you explain that in more detail?

What are the main benefits or drawbacks?

Can you give me an example?

close

bookChallenge: Modify Array Values

Deslize para mostrar o menu

Tarefa

Swipe to start coding

Write a function that modifies every element of an array by doubling its value. Follow these requirements:

  • Declare and initialize the array in main;
  • Pass the array and its size to a function;
  • Use a loop to access each element;
  • Modify the array in place;

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 4
single

single

some-alt