Unable to get the required solution


this is my code can anyone improvise it and tell what i am lacking;