DXC Technology Interview Question

they asked me how to write the code for fibonacci series and explain it?