Search:

Type: Posts; User: Adak

Search: Search took 0.06 seconds.

  1. Right. "i' needs to be an integer. Sum should...

    Right.

    "i' needs to be an integer. Sum should be an integer when you are adding integers, but a double when you are adding doubles.

    "ave" definitely should be a double.
  2. //this is what i'm doing now double...

    //this is what i'm doing now
    double theAverage(double M[]){
    double ave;
    ave=(double)(M[0]+M[1]+M[2]+M[3]+M[4])/SIZE;

    return ave;

    }
  3. Your array was a local or automatic variable, not...

    Your array was a local or automatic variable, not a global one. So if you want the other functions to work with the array, you need to tell them where they can find it (an address, which is what a...
  4. #include #include #define...

    #include<stdio.h>
    #include<stdlib.h>
    #define SIZE 5


    int largest(int *L){
    int i,big;

    big=L[0];
    for (i=1;i<SIZE;i++){
Results 1 to 4 of 4