Averages/Arithmetic mean: Difference between revisions

→‎BASIC: minor edits to explanatory text; changed "works with" to qbasic
(changed requirement regarding empty input, worded so it doesn't invalidate existing solutions; changed C example to *not* return 0 on such input.)
(→‎BASIC: minor edits to explanatory text; changed "works with" to qbasic)
Line 184:
 
=={{header|BASIC}}==
{{works with|QuickBASIC|4.5QBasic}}
 
Assume the numbers are in aan DIMarray named "nums".
<lang qbasic>mean = 0
sum = 0;
Line 199:
PRINT 0
END IF</lang>
 
 
=={{header|BBC BASIC}}==
1,150

edits