I had done the coding but I don't where is the error bcz there is a error in the program.The program shows error when compiling.plz help me.i'm using visual c++ 6.0 compiler between.i using c language.thanx in advance for helping.

Write a program that inserts 25 random integers from 0 to 100 in order in a linked list. The program should calculate the sum of the elements and the floating-point average of the elements. (8 marks)

Sample output:

The list is:
6 12 14 20 27 31 31 34 37 38 56 59 63 66 72 73 73 76 77 79 88 94 95 96 97 *

The sum is 1414

The average is 56.56

my coding:

Code:
```#include <stdio.h>
#include <stdlib.h>
#include <time.h>

typedef struct Listnode {
int data;
struct Listnode *nextPtr;
}ListNode;

typedef ListNode *ListNodePtr;

int sumList(ListNodePtr a);
double averageList(ListNodePtr a);
void insert(ListNodePtr *sPtr, int value);
void printList(ListNodePtr currentPtr);

int main(void)
{

srand(time( NULL));

for (i=1;<=25; i++) {
insert(rand() %101);
)

printf("The list is:\n");
printf("The sum is %d\n");
printf("The average is%f\n");

return 0;

}

int sumList(ListNodePtr a)
{

while ( currentPtr !=NULL) {

total +=currentPtr->data;

}

double averageList(ListNodePtr a)
{

while (currentPtr !=NULL){
++count;
total += currentPtr->data;

}
}

void insert(ListNodePtr *sPtr, int value)
{

}
void printList(ListNodePtr currentPtr)
{

}```

2. error 1:in main() variable 'i' is undefined.define it as
Code:
`int i`
error 2:insert function should take 2 arguments while calling it.
Code:
`insert(rand() %101);`
error 3:change the closing brace here
Code:
```for (i=1;<=25; i++) {
insert(rand() %101);
}```
these are the basic errors that can be corrected at compile time.

3. Okay you're new here. Welcome to the board.
Please note that your target audience of people who can actually help you include amoung others, many professional software developers, who like myself will tend to simply ignore those that write as though they're texting a seven year old.
Unless a seven year old is who you expect to be helping you, I suggest you don't use things like bcz, plz and thanx here. Also, make sure you use propper capitalisation. I've seen a lot worse than this, but I'll give you the heads-up right from the get-go.
Not trying to be harsh, just want to be clear on this for your own bennefit.

The best thing you can do with that code is to start the practice of indenting. Each line after an open-curly-brace should start with one more tab than the previous line. Each line after a close-curly-brace then starts with one less tab. This makes it vey easy to spot things like the start and end of a function, or the start and end of a control block, such as the end of a while loop. Doing this now will make one of your errors obvious.

Another important tip is that if your compilers gives errors, don't just tell us about them, actually copy the first few of them and paste those here. People are more likely to help if they can fix your bugs without having to create a new project, copy the code across and compile it just to have the errors pointed out.