Skip to content

Create a program that loads a sequence of numbers into an array and then calculates the average of the array elements. Allow the user to specify the size of the array, allocate the array dynamically, and use a) a function that works with the array, b) a function that uses pointers to find the average.

Notifications You must be signed in to change notification settings

Nalim1955/Number_sequence_with_pointers_function

Repository files navigation

Number sequence with pointers function

Create a program that loads a sequence of numbers into an array and then calculates the average of the array elements. Allow the user to specify the size of the array, allocate the array dynamically, and use a) a function that works with the array, b) a function that uses pointers to find the average.

Postupnosť čísel s funkciou ukazovatele

Vytvorte program, ktorý do poľa načíta postupnosť čísel a následne vypočíta priemer z prvkov pola. Umožnite veľkosť pola zadať používateľovi, pole alokujte dynamicky a na nájdenie priemeru použite a) funkciu, ktorá pracuje s polom, b) funkciu, ktorá využíva ukazovatele.

About

Create a program that loads a sequence of numbers into an array and then calculates the average of the array elements. Allow the user to specify the size of the array, allocate the array dynamically, and use a) a function that works with the array, b) a function that uses pointers to find the average.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages