Can u please append my code

i am not able to print the answer please append my code

i have done the work of printing you can check

if you have any doubt feel free to ask

Modified Code