So I'm just getting started in C++ and need some help. I want to right a program that inputs a number as n and then outputs digits 0-9 based on n. Also each row adds one more number until the last number is the number of digits of n.

For example if n=8

output would be

1

12

123

1234

12345

123456

1234567

12345678

any help would be great!