Question: Integer numElements is read from input. The remaining input alternatives between strings and integers. Declare string vector subjectList and integer vector pageList, each with numElements
Integer numElements is read from input. The remaining input alternatives between strings and integers. Declare string vector subjectList and integer vector pageList, each with numElements elements. Then, read and store all the strings into subjectList and all the integers into pageList. Ex if the input is 4
trade 267 swimming 377 grammar 182 energy 387
then the output is
subject: trade, page: 267
subject: swimming, page: 377
subject: grammar, page: 182
subject: energy, page: 387
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
