What is wrong in my code?

i did the exact same thing as sir, then where is my code wrong. pls help me point out my mistake.

hello @kshitijsrc

make ur return type float

i am only returning ans and that is already a float variable. Still i can’t point out my mistake

make function return tyep as float , u have made it int thats why it is giving only int part