If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Pascal Help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-02-03, 17:08
Ironfxme Ironfxme is offline
Registered User
 
Join Date: Oct 2003
Posts: 3
Pascal Help

Hi guys, new member here. Hate to barge in on forums just like this, I'm a mod on a few forums totally not related to computer science whatsoever but they are still highly reputable, so I'm going to try and structure my questions well. I'm taking a course in pascal, the lecturer expects everyone to live the life and be gods, if that were true I wouldn't be on the course.... so I need some help in making a program. The question :

'Write a program which adds up the numbers from 1 to 100 and displays the result"

Question 2 :

"Write a program which asks the user to input a date e.g October 4, followed by the noon temperature on that day for the last 5 years. The program should calculate and display the maximum, minimum and average temperatures"

All I know is that we have to use procedures & Iteration e.g

WHILE score <> -1 DO
etc et ......

Any help would be welcomed so much, it's a hard game if you dont know where to start .

Yours, Lee.
Reply With Quote
  #2 (permalink)  
Old 10-14-03, 00:34
fivz fivz is offline
Registered User
 
Join Date: Oct 2003
Location: philippines
Posts: 2
Smile Re: Pascal Help

Quote:
Originally posted by pibz
Hi, mr. Lee I can answer your first question just try this program:

program sample;
uses crt;
var ans,finans,lastfi:integer;
begin
ans:=1;
finans:=1;
while ans<=100 do
begin
ans:=ans+1;
finans:=finans+ans;
lastfi:=finans-ans;
end;
writeln(lastfi);
readln;
end.

Hope this could help you...edit some of it, though. Now you have an idea.





Last edited by fivz; 10-14-03 at 00:38.
Reply With Quote
  #3 (permalink)  
Old 10-14-03, 02:35
Ironfxme Ironfxme is offline
Registered User
 
Join Date: Oct 2003
Posts: 3
Thank you very much my friend the help is much appreciated
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On