Computer Science Canada

plz help

Author:  Crazygirl [ Fri Nov 15, 2002 2:35 am ]
Post subject:  plz help

plz help me again Crying or Very sad Crying or Very sad
im in trouble with these program:-

program no 1

Ask the user for a series of firstnames,lastnames,and marks(x,x,or negative mark to exit ; max 30 records).write these to files1.dat
open files 1.dat to see how the data appears in the file.

thank you very much
Smile Laughing [/u]

Author:  Tony [ Fri Nov 15, 2002 3:09 am ]
Post subject: 

well it should be something along those lines:


var name : array 1..10 as string
var lastname : array 1..10 as string
var mark: array 1..10, 1..30 as double
var ans : char(1)

counter += 1

get name(counter)
get lastname(counter)

markcounter +=1
get mark(markcounter)
exit when mark(markcounter) <0
end loop

getch ans

exit if ans = "q"

end loop

This should give you the basic idea of the program structure... just run some loops with counters and store info in the arrays...

There's a tutorial about printing to file [url =]here[/url], you just print the array you saved in the program

Author:  Crazygirl [ Tue Nov 19, 2002 12:16 am ]
Post subject:  thnx alot

hey tony Very Happy
i dunt knw how much to thnx you; for the code . it was very very helpful..... With yur help i finished my assgnment on time. Very Happy Very Happy Very Happy

thanx again

Author:  Tony [ Tue Nov 19, 2002 1:07 am ]
Post subject: 

hey, no problem... I know that some teachers don't teach very well... especially when it comes to computers Crying or Very sad

LOL, funny thought... just remembered how my teacher is teaching us C++... few days ago we got a handout with like 10-15 of random short programs with those words of advice "read over those programs and hopefully you gonna learn something from it"

Oh crap... I hate C++... Damn it, who made it a standart?! It sucks... better then turing though Very Happy

Grr... and CCC will be written in C++ Mad I wanna learn 8)