Loops and file handling (edited) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Loops and file handling (edited)

my prg creates a .dat file containing the roll no, names and marks of students then I proceed to display them individually based on the roll no the user wants to see. For example roll no:42 Mark roll no:2 Steven roll no: 177 Lucy.( Entered in any order) The prg only works when the data the user wants is the first roll no. Since the roll nos are not continuous a basic loop doesn't seem to work for me.

18th Dec 2016, 2:22 PM
Vianni Fernandes
Vianni Fernandes - avatar
4 Answers
+ 2
I didn't understand your problem. Can you add code here?
18th Dec 2016, 3:47 PM
Vladimir Honcharenko
Vladimir Honcharenko - avatar
+ 2
Copy to your IDE and try it: https://code.sololearn.com/clCLGAp5X99L
18th Dec 2016, 5:54 PM
Vladimir Honcharenko
Vladimir Honcharenko - avatar
0
it's on my laptop. I can't really post it here. can't take pictures too
18th Dec 2016, 4:43 PM
Vianni Fernandes
Vianni Fernandes - avatar
0
I'll edit the question
18th Dec 2016, 4:44 PM
Vianni Fernandes
Vianni Fernandes - avatar