Results 1 to 3 of 3

Thread: Pascal Help

  1. #1
    Join Date
    Oct 2003
    Posts
    3

    Unanswered: 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.

  2. #2
    Join Date
    Oct 2003
    Location
    philippines
    Posts
    2

    Smile Re: Pascal Help

    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 01:38.

  3. #3
    Join Date
    Oct 2003
    Posts
    3
    Thank you very much my friend the help is much appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •