Description: the program assumes that we have a raileay station, when the train leaves we denote that as (D), and when it enters we donote that as (E), so (ED) means that the train entered the station and then left, (EEDD) means that a train entered, another one entered, a train of them left, the other one left too.
the combination (EDD) is wrong because a train entered, the train left, and onether train left, but that s not possible because after the train left the station is empty..
we re going to use stacks to deal with each combination the user enters, the idea is when we read (E) we push it, when we read (D) we pop the (E), the combination is considered true when we re done reading and the stack is empty.
To Search:
File list (Check if you may need any files):
Railway station\Debug\SecondQuestion.exe
...............\.....\SecondQuestion.ilk
...............\.....\SecondQuestion.pdb
...............\SecondQuestion\Debug\SecondQuestion.log
...............\..............\.....\...............tlog\CL.read.1.tlog
...............\..............\.....\...................\CL.write.1.tlog
...............\..............\.....\...................\link.read.1.tlog
...............\..............\.....\...................\link.write.1.tlog
...............\..............\.....\...................\SecondQuestion.lastbuildstate
...............\..............\.....\Source.obj
...............\..............\.....\vc120.idb
...............\..............\.....\vc120.pdb
...............\..............\SecondQuestion.vcxproj
...............\..............\SecondQuestion.vcxproj.filters
...............\..............\Source.cpp
...............\SecondQuestion.sdf
...............\SecondQuestion.sln
...............\SecondQuestion.v12.suo
...............\..............\Debug\SecondQuestion.tlog
...............\..............\Debug
...............\Debug
...............\SecondQuestion
Railway station