help! :(

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • honeygrl33

    #1

    help! :(

    i accidentially erased something someone helped me write and i am soooo
    in trouble if i dont fix this, i really need the help!!!!!

    heres what i have:
    /*
    */

    #include <stdio.h>
    #include <stdlib.h>

    #define SIZE 12

    void printResults (char months[][15], double sales[]);
    void storeSales (char months[][15], double sales[]);

    int main ( void )
    {
    system ("clear");
    int i;
    double sales[ SIZE ];
    char months [SIZE][15] = {"January", "February", "March", "April",
    "May",
    "June", "July", "August", "September" , "October",
    "November", "December"} ;

    for (i = 0; i < SIZE; i++)
    {
    printf("%-9s: %9.2f/n", months[ i ], sales[ i ]);
    }
    storeSales (months, sales);
    printResults (months, sales);
    return 0;

    }
    void storeSales ( char months[][15], double sales[] )
    {
    int i = 0;
    for ( i = 0; i < SIZE; i++ )
    {

    do
    {
    printf("Enter the store's sales for the month of %s:",
    months[ i ]);
    scanf( "9.2%lf", &sales [ i ]);
    printf("\n");
    }
    while ((sales[ i ] < 0.00 ) || ( sales[ i ] > 100000.00));
    }
    }


    ----------------------------
    i need the printresults...
    lowest, highest, and average... heeeeelp! please? i will owe u one!!

Working...