This is for problm 23 but is is not good way to short out this problem plaese provide me some better idea