Cognizant Interview Question

Write C code for basic series pattern type questions