Edited by SOORENA, 21 February 2006 - 09:12 PM.
Pascal adding inputs
Started by
SOORENA
, Feb 21 2006 09:02 PM
#1
Posted 21 February 2006 - 09:02 PM
#2
Posted 22 February 2006 - 01:37 AM
Hello SOORENA,
I would define a large integer array (or float). Then use readln() or read() procedure to get the user input and store it in the array. Loop the input until the user enters, let's say, zero. Then exit the loop and add up the numbers, divide them by the number of inputs and voila, you have an average.
I would define a large integer array (or float). Then use readln() or read() procedure to get the user input and store it in the array. Loop the input until the user enters, let's say, zero. Then exit the loop and add up the numbers, divide them by the number of inputs and voila, you have an average.
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users