plz help
Author |
Message |
Crazygirl
|
Posted: Fri Nov 15, 2002 2:35 am Post subject: plz help |
|
|
hello
plz help me again
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
[/u] |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Fri Nov 15, 2002 3:09 am Post subject: (No subject) |
|
|
well it should be something along those lines:
code: |
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)
loop
counter += 1
get name(counter)
get lastname(counter)
loop
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 = http://danco.no-ip.com/turing/viewtopic.php?t=5]here[/url], you just print the array you saved in the program |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Crazygirl
|
Posted: Tue Nov 19, 2002 12:16 am Post subject: thnx alot |
|
|
hey tony
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.
thanx again |
|
|
|
|
|
Tony
|
Posted: Tue Nov 19, 2002 1:07 am Post subject: (No subject) |
|
|
hey, no problem... I know that some teachers don't teach very well... especially when it comes to computers
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
Grr... and CCC will be written in C++ I wanna learn VB.net 8) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
|
|