Write a recursive void function that has one parameter which is a positive integer. When called, the function is to write its arguments to the screen backward: If the argument is 1234, the output should be. 4321.

What will be an ideal response?

```
void backward(int n)
{
if(n<10)
cout < n;
else
{
cout << n%10; // write last digit
backward(n/10); // write rest of digits (backwards)
}
}
```

Computer Science & Information Technology

You might also like to view...

All of the following EXCEPT ________ are common delimiters

A) slashes B) commas C) tabs D) spaces

Computer Science & Information Technology

Name the two types of clip views in the Project panel

What will be an ideal response?

Computer Science & Information Technology