5062CEM

Programming and Algorithms 2

Control Statements in C++

Control Statements in C++

For this activity, you will need to be using an Integrated Development Environment (IDE). The recommended IDE for this module is JetBrains IntelliJ IDEA for Python and JetBrains CLion for C++. You can follow instructions at the following page to set up your development environment:

Setting up your Development Environment

For this task, you need to write a script that will reverse a string, utilising a for loop. The aim of the function is to reverse a string, i.e. 'hello' to 'olleh'. The function should return the reversed string.

Write a script that prints all the numbers from zero to ten, but skips numbers \(4\) and \(7\). The function should return an array of numbers, for example: [0, 1, 2, 3, 5, 6, 8, 9, 10].

If you are struggling with this lab activity, you may want to get some additional support. You can speak to the module leader/team in the room of when the lab week is active, or you can visit the Additional Support page for more information on how you can get extra support.