ques24.cpp