Why Giving Run Error!

Answer link–>https://ide.geeksforgeeks.org/B02adzDgJ8

Pls elaborate ur approach.