Maveric Systems Interview Question

Own program to write numbers in given sequence