PHP PROGRAM TO FIND SUM & AVERAGE OF NUMBERS IN ARRAY - STUDENTSBLOG100 PHP TUTORIAL


This program is used to display or find sum or addition of numbers present in array and finding average of numbers or integers present in an array.

Programming Logic:

  • Get the sum of integers present in an array.
  • Count the number of integers present in the array.
  • Divide sum of integers with number of integers present in the array.
  • Display the result

FIND SUM & AVERAGE OF NUMBERS IN ARRAY MODEL 1:
Output:
Number of integers present in array are: 5
Sum of integers present in array is: 15
Average of array numbers is: 3

FIND SUM & AVERAGE OF NUMBERS IN ARRAY MODEL 2:
Output:
Avg of array numbers is: 3

Click Here to get -- > Php Tutorials by Studentsblog100

Previous
Next Post »