Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 plz help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Crazygirl




PostPosted: Fri Nov 15, 2002 2:35 am   Post subject: plz help

hello
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]
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Crazygirl




PostPosted: 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
Tony




PostPosted: 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 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 VB.net 8)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: