Help me make a pascal program for school...

Joined
Apr 11, 2005
Messages
337
Reaction score
3
Write a program that reads the temperatures measured 4 times a day as well as the quantity of precipitation, the temperatures and precipitations are measured for a weak. After doing that the program should write the maximum temperature and the day and hour asociated with it, and the day with the minimum temperature and the day and hour asociated with it. I know for u might sound stupidly simple but I suck at it so... pls do help me.
OH AND FOR THE PRECIPITATIONS AND TEMPERATURE CHOOSE RANDOM.
 
Last edited:
help me make?and though u ask some1 to make all the program themselves?
 
Are you trying to make a program that measures the temperature and amount of rainfall, or by saying, "OH AND FOR THE PRECIPITATIONS AND TEMPERATURE CHOOSE RANDOM" do you mean you are going to make the information up? Otherwise you will need to record data from sensors, which will mean you need to code differently to interact with different sensors.
 
What you need to do is start helping yourself by actually using your Brain to think and solve the problem in a systematic manner. If you constantly leech off others and get them to do the work for you, you will never learn anything.

There are literally millions of sites out there on your topic, many with excellent information. Start using a Search Engine and see what you can find.

I'll be nice this time and give you http://www.learn-programming.za.net/learn_pascal_programming.html to get started, but don't get the notion that you can always ask others for help.

One more thing: Pascal is now considered an obsolete language with no advantages over other more powerful languages such as C/C++; the latter you should definitely learn if you plan on doing any 'real' programming.
 
Last edited:
What you need to do is start helping yourself by actually using your Brain to think and solve the problem in a systematic manner. If you constantly leech off others and get them to do the work for you, you will never learn anything.
thats what i was thinking. try to make ur own stuff, try to learn how to do that on ur own and dont beg ppl to make one for u. i would hepl u but ive learne visual fox at school and its preety basic and crappy(long live microsoft)
 
Then why are you learning it?

I know it's for school, but there are no school systems I'm aware of that make it mandatory for students to study programming.

Why? Because it's an easy to learn laguange that makes it easy for people to start out programming.

It is also a procedure oriented programming language that makes it harder for the user to program which in turn makes them have a better understanding on how to program efficiently then you can with OOP languages like Java, C/C++, and VB.

Yes it's old and outdated. But here in the states it was the main language they thought 10-15 years ago. And many school systems still have teachers that know how to program in it and still have the books to teach it with. So why buy all new books (which costs $1000s) when they can use the old ones that they already had and use them for an introduction to programming course?

Also just because it is no longer used to write programs doesn't mean it's pointless to use. The likly hood of seeing newer languages used in a buisness isn't that likely unless it's newer. Most buisness that's been usising computers since the 70's still have all their programs written in COBOL which is older then PASCAL. And if it's a company that's been using computers since the 80's then most likely they are running PASCAL based programs. C++ wasn't used much until the 90's. So when you are employed by a company to update their old programs it'll be highly helpful to know some of the older programming languages like COBOL and PASCAL as they are the ones that was used most back in the time.

And you really shouldn't be bashing older langauges as they are still just as powerful and they are reliable as it seems with programs that are 20-30 years old still doing their job just fine.

Now for Sergiu14. The logic for your program is quite simple.

All you need is a 2 dimentional array. Then read read the data in as [temp, hour, precipitation] for columns [1, 2, 3]. Then you sort the arry by column 1. That way the values you need will be the first and last rows of the array.

Don't ask me how to code it though. Because 1 I don't remember exactly how to program in PASCAL, 2 I don't intended to look up how to, and 3 it's your work and you need to learn how to do it.

I told you the steps of doing it and now it's your turn to write how to do it. It shouldn't take you more then 15mins as it's pretty easy to do.

NoPeace - out
 
Yes it's old and outdated. But here in the states it was the main language they thought 10-15 years ago. And many school systems still have teachers that know how to program in it and still have the books to teach it with. So why buy all new books (which costs $1000s) when they can use the old ones that they already had and use them for an introduction to programming course?
Speaking from the perspective of an instructor of several programming courses (mainly C/Asm), I can say that the instructors who need to teach from books don't really know the material thoroughly enough, or haven't yet figured out the power of the Internet. As for me, I use a combination of material I write myself and that which I find on the Internet.

Also just because it is no longer used to write programs doesn't mean it's pointless to use. The likly hood of seeing newer languages used in a buisness isn't that likely unless it's newer. Most buisness that's been usising computers since the 70's still have all their programs written in COBOL which is older then PASCAL. And if it's a company that's been using computers since the 80's then most likely they are running PASCAL based programs. C++ wasn't used much until the 90's. So when you are employed by a company to update their old programs it'll be highly helpful to know some of the older programming languages like COBOL and PASCAL as they are the ones that was used most back in the time.
Many of them are starting to migrate to C++ or even C#.
 
Speaking from the perspective of an instructor of several programming courses (mainly C/Asm), I can say that the instructors who need to teach from books don't really know the material thoroughly enough, or haven't yet figured out the power of the Internet. As for me, I use a combination of material I write myself and that which I find on the Internet.

Funny, you sound like my professor on C++ - he hates the internet as far as I know, but did write 'the' book on C and C++ - You'll probably know them as the C++ annotations by Frank Brokken :)

More ontopic, you're right that pascal is an outdated language, but there are plenty of colleges that require students to study useless languages themselfs. I for instance had to take a course in java, even though it extended little further then writing a hello world program and there is a optional course on C++ being given by a much better teacher. Hell, I had to 'learn' HTML from teachers whose skills were limited to framesets :) So yeah, I can believe quite easily that Sergiu must learn this.

Totally ontopic: I have never coded in pascal, yet your problem is, as has been mentioned, easily solveable by using a 2 dimensional array. Moreso, I would suggest writing the array to either a database or a comma seperated values file (.csv), one line for each readout, and then use simple compare functions to find the maximum temperature.

A simple SQL query for instance could do this: SELECT time, MAX(temperature) FROM table GROUP BY DAY(date_field) - this would give you a list of all past days with the max temperature and the time of occurance for all days recorded. All your program would need to do is put it in the database several times a day. In a simple language like PHP that would be about 10 lines of code, but I do not know how much it'd be in pascal ofcourse :)
 
Back