Question: is this below correct regarding this question in C++, Write an algorithm to determine the average of a linked list of real numbers with first

is this below correct regarding this question in C++, Write an algorithm to determine the average of a linked list of real numbers with first node pointed to by first?

float num = 0; int number; ptr= first; while (ptr != null_value) { num += ptr -> data; number++; ptr = ptr-> link }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!