Search⌘ K
AI Features

Challenge: Paper Sizes

Explore how to use recursion to print ISO paper sizes from A0 to An by implementing the papersizes function. Learn to apply recursive division rules to length and breadth, understanding how each paper size relates to the previous one through halving dimensions. This lesson strengthens your grasp of recursion applied to real-world measurement problems.

Problem statement

In this challenge, you have to implement the papersizes function.

void papersizes(int i, int n, int l, int b);

Your task is to write a recursive function that obtains paper sizes from A0 to An.

In the papersize( ) function:

  • i is passed to ...