0

Hey guys , im having a problem in starting a project. Basically , i am suppose read from a file(Data.txt) and then display the information in that file in a new format.

Data.txt
HIstory M123
Maths M103
Science M111
English M105

As the results needs to be displayed based on the subjects with the lowest subject code , in this case Maths, how do i go about doing it? I was thinking it of storing it into an array , but the problem is, how do i read the value out of it in the first place and comparing it to the rest of the subject code to check which one is the lowest and then displaying it first followed by the rest?

Expected output :

Maths M103
English M105
Science M111
HIstory M123


A clue about the type of methods i should be looking at will help alot.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by pecet
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.