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

Username:   Password: 
 RegisterRegister   
 I NEED HELP! :(
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bizkit




PostPosted: Sat Nov 16, 2002 9:40 pm   Post subject: I NEED HELP! :(

Hey Hows it goin?
i have an assignment due that im totally lost on ive made most of the code but about 5 lines can you help me out? this is the assigntment outline:
Each day, the Northcastle Times newspaper receives a file called 'listings' provided by TV Guide in a list form. This file is used to publish the local TV listings in the newpaper. The file has the following format.

Time: 7:00
channel
program title
details
channel
program title
details
Time: 7:30
channel
program title
details
channel
program title
details
channel
program title
details
channel
program title
details

etc.

The file is suitable for producing a listing in column format. Channels with programs more than a half hour long will not appear in the next time slot in the 'listings' file. This information in list form is published daily.
The TV program information is also published in a chart form. This has proved popular with readers of the newspaper.
I've made most of the code but im stuck on this part:
%1 get line from file
progtitle := line
lengthprogtitle = progtitle
if lengthprogtitle>18 then
lengthprogtitle= 18
%6 progtitle = first 18 characters of progtitle
end if
%8 numspaces = number of spaces needed to fill 18 space slot
%9 spaces = " how many are needed " - hint use repeat function
%10 chart(row) = chart(row) + ...
get :streamnumber, line : * %get program details but don't use
exit when eof(streamnumber)
1 more thing is i dont know how to display what i got from the file which is:
procedure print_chart(var chart : array 1..12 of string)
put "CH 7:00 7:30 8:00 8:30"
% 11 lines needed to print chart
% 12
% 13
end print_chart

thanks alot
Kyle
Sponsor
Sponsor
Sponsor
sponsor
TokenHerbz




PostPosted: Mon Oct 24, 2005 11:19 pm   Post subject: (No subject)

No!
Tony




PostPosted: Tue Oct 25, 2005 7:53 am   Post subject: (No subject)

well you read from file later on in your code, why are you having difficulties in the beginning?
Turing:

put "formatting" : 30, "is" : 20, "easy" : 10, "!"
put "it" : 30, "really" : 20, "is" : 10, "."


you also appear to have an exit when, but no loop. Where were you getting those lines of code from?

oh, and you use length() to find out how long the string is.
[Gandalf]




PostPosted: Wed Oct 26, 2005 4:38 am   Post subject: (No subject)

TokenHerbz wrote:
No!

And then you ask for help Rolling Eyes .
TokenHerbz




PostPosted: Wed Oct 26, 2005 1:23 pm   Post subject: (No subject)

dont hate me but.....


Posted: Sat Nov 16, 2002 10:40 pm Post subject: I NEED HELP! Sad




I dont know why i did it... :'(
[Gandalf]




PostPosted: Wed Oct 26, 2005 2:08 pm   Post subject: (No subject)

wtf? Oh, so you broke many rules as opposed to one - great! Evil or Very Mad

Cervantes says: Indeed. Calls for some negative bits. Something of the order of... 15? Twisted Evil
Net gain for TokenHerbz from Cervantes = 0
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  [ 6 Posts ]
Jump to:   


Style:  
Search: