Exercises

0 / 50

Given a string str and an int n, return a string made of the first n characters of the string, followed by the first n - 1 characters of...

0 / 50

Write a function in C++ called 'factorial' that will take a positive integer as input and returns its factorial. In math, a factorial is...

0 / 50

Write a function in Ruby called 'factorial()' that will take a positive integer as input and returns its factorial as output. backwards.

...
0 / 10

Write a function that returns true if a is even, false otherwise. Just for practice, you must use an if statement.

0 / 10

This method takes an array of integers as its parameters and returns nothing. The method moves each element in the array to the right by...