help needed! pascal novice

Discuss all aspects of programming here.

Moderator: The Mod Squad

help needed! pascal novice

Postby bobchiba » Sun Mar 09, 2008 4:29 pm

HI, new to the forum...
Im trying to create a program that accepts 10 whole numbers from -100 to +100, and then performs sums to calculate the sum of these numbers, and then seperate sums for the negative, and then the positive numbers. Curently I have a prompt for each input, followed by code to add it to a running total, as well as adding it to the +/- running totals.
I think im going about this a very long way....how would I let the user enter the 10 integers in one go, and then do all the sums at the end, instead of after every input.

Any advice much appreciated
bobchiba
 

Postby evasive » Tue Mar 11, 2008 7:12 am

if you are following classes you should have paid attention. this looks like a typical assignment from school...
We hate rut, but we fear change.
********************************
System error, strike any user to continue...
evasive
Mobo-fu Master
Mobo-fu Master
 
Posts: 37389
Joined: Sun May 06, 2001 12:01 am
Location: Netherlands


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest