Search:

Type: Posts; User: 3MGFX

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,932

    ^^You're absolutely right, man. But if you read...

    ^^You're absolutely right, man. But if you read the bottom of my post, you would see that I was trying to explain the way I was approaching the problem..and maybe someone more experienced could show...
  2. Replies
    4
    Views
    1,932

    bus error in code

    I can't figure out why I'm getting a bus error here..



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

    void RecursivePermute(char jumble[], int k, char * words[], int...
  3. Thread: Quick array fix

    by 3MGFX
    Replies
    8
    Views
    1,134

    I just understood what you meant, and I set both...

    I just understood what you meant, and I set both variables equal to 0.

    But I'm not sure if it is printing the correct information still..
  4. Thread: Quick array fix

    by 3MGFX
    Replies
    8
    Views
    1,134

    double array[6], temp, temp2, numrevs, gas; ..? ...

    double array[6], temp, temp2, numrevs, gas; ..?

    ..unless there is something else I need to do.
  5. Thread: Quick array fix

    by 3MGFX
    Replies
    8
    Views
    1,134

    /* Definition libraries. */ #include ...

    /* Definition libraries. */
    #include <stdio.h>
    #include <stdlib.h>

    /* Defines constants. */
    #define PI 3.14159
    #define INCHES_IN_FEET 12
    #define FEET_IN_MILE 5280

    /* Initializes functions....
  6. Thread: Quick array fix

    by 3MGFX
    Replies
    8
    Views
    1,134

    Quick array fix

    This code doesn't seem to be looping properly because it doesn't store the correct array values (in fact, the values are all set to 0 in the end). And I can't figure out why for the life of me..

    ...
  7. Replies
    17
    Views
    2,902

    case 11: for(i = 0; i < stock_num; i++)...

    case 11:
    for(i = 0; i < stock_num; i++)
    total_price += (input_item_stock[i]) * (input_unit_price[i]);
    printf("Total price of all the items: $&#37;.2f\n\n", total_price);

    ...
  8. Replies
    17
    Views
    2,902

    case 8: printf("Items to be...

    case 8:

    printf("Items to be reordered\n\n");
    for (i = 0; i < stock_num; i++)
    if(input_item_stock[i] < MIN_STOCK_LEVEL)
    printf(" &#37;d\n",...
  9. Replies
    17
    Views
    2,902

    I have a few more questions... case 8: ...

    I have a few more questions...



    case 8:

    printf("Items to be reordered\n\n");

    /* for(i = 0; i < stock_num; i++)
    fscanf(ifp, "&#37;d%",...
  10. Replies
    17
    Views
    2,902

    Thanks alot Adak! I tried something like this...

    Thanks alot Adak!

    I tried something like this earlier since I figured the function printCurrentStatus() was facilitating most of my problems, but I didn't think of creating a new variable to...
  11. Replies
    17
    Views
    2,902

    #include #include ...

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

    #define MAX_TBL_SIZE 30

    void printCurrentStatus(int input_item_id[MAX_TBL_SIZE], int input_item_stock[MAX_TBL_SIZE], float...
  12. Replies
    17
    Views
    2,902

    #include #include ...

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

    #define MAX_STRING_SIZE 20
    #define MAX_TBL_SIZE 30

    void printCurrentStatus(int input_item_id[MAX_TBL_SIZE], int input_item_stock[MAX_TBL_SIZE], float...
  13. Replies
    17
    Views
    2,902

    #include #include ...

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

    #define MAX_STRING_SIZE 20
    #define MAX_TBL_SIZE 30

    void printCurrentStatus(int input_item_id[MAX_TBL_SIZE], int input_item_stock[MAX_TBL_SIZE], float...
  14. Replies
    17
    Views
    2,902

    Ok, I'm definitely making progress, and I pretty...

    Ok, I'm definitely making progress, and I pretty much understand how my entire program works as of now..

    Here is what I have coded:




    #include <stdio.h>
    #include <stdlib.h>
  15. Replies
    17
    Views
    2,902

    Retail Outlet Managment System

    Hi Board,

    I am aware of the thread that already exists on this subject, but it hasn't been able to help me with the problems that I am experiencing. Thus, I decided to create a thread of my own....
  16. I finally figured out the solution, yes! ...

    I finally figured out the solution, yes!

    Thanks for all the help!

    - Hugh
  17. I'm not really understanding what you're talking...

    I'm not really understanding what you're talking about, but I'm trying..

    Ok, the break statement allows 'N' and 'n' to call the reportSummary() function properly. So that's good..

    However,...
  18. Still isn't working.. Here is my most recent...

    Still isn't working..

    Here is my most recent code:


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

    void welcome();
    void processOneStudent();
  19. Fair enough. Now how do I incorporate that...

    Fair enough.

    Now how do I incorporate that into my program so that it works properly? I posted my attempt above, and it's pretty close to what I want, but then it exits unexpectedly again..

    any...
  20. printf("more students (Y or N)? "); scanf("%c",...

    printf("more students (Y or N)? ");
    scanf("&#37;c", &moreStudents);

    while ((moreStudents == 'Y')||(moreStudents == 'y')) {
    numStudents = numStudents + 1;
    processOneStudent();
    ...
  21. Can you explain how to use this code? And what is...

    Can you explain how to use this code? And what is an infinite loop?
  22. I also realized that I don't need to declare "...

    I also realized that I don't need to declare " moreStudents = 'Y' " since it returns the same result, which is why I chose not to include it in my revised code.

    Note: Actually, this declaration...
  23. Ok. This is what I have now: printf("more...

    Ok.

    This is what I have now:


    printf("more students (Y or N)? ");
    scanf("&#37;c", &moreStudents);

    while ((moreStudents == 'Y')||(moreStudents == 'y')) {
    numStudents = numStudents + 1;
  24. This is what I get with my original code: more...

    This is what I get with my original code:

    more students (Y or N)? y
    Enter student id, class, cum. hours, cum. GPA: 1001 2005 10 3.30
    Hours and grade (0 0 to end)? 4 4
    Hours and grade (0 0 to...
  25. I'm still not understanding how to write the...

    I'm still not understanding how to write the while loop that everyone is suggesting. My objective is to repeat the "more students (Y or N)?" script and continue processing more students until the...
Results 1 to 25 of 31
Page 1 of 2 1 2