Search:

Type: Posts; User: randyjohnson

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    2,276

    I've only been programming for 3 months. Excuse...

    I've only been programming for 3 months. Excuse me for not knowing everything, I do what my professor teaches me. If that's a bad method, then oh well. But thank you for being so upstanding.
  2. Replies
    12
    Views
    2,276

    Come on guys, I'm really desperate here I just...

    Come on guys, I'm really desperate here I just need to get this done so I can pass the semester. I'm getting to the point where I'll give 10 bucks via paypal to anyone who can get this running. I've...
  3. Replies
    12
    Views
    2,276

    I've been making lots of modifications to the...

    I've been making lots of modifications to the code but I still can't get this to work right. Can anyone help?



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

    typedef struct...
  4. Replies
    12
    Views
    2,276

    I adapted the code I'm using from a text book...

    I adapted the code I'm using from a text book example, I tried to modify to make it fit for my project so that would explain the unused variables.
  5. Replies
    12
    Views
    2,276

    It compiles and runs for me and lets me enter...

    It compiles and runs for me and lets me enter some employee details but the problem I'm having is the output isn't coming out correctly. It seems to pick a random first name from one of the employees...
  6. Replies
    12
    Views
    2,276

    Help with structures and linked lists.

    Here is my problem: Write a program that utilizes a structure and linked list to store employee information taken from the keyboard (first name, last name, three digit employee id number). The...
  7. Replies
    43
    Views
    3,320

    You have to do it with the total though like if...

    You have to do it with the total though like if the UPC was 681131700085, after calculating the total comes to 85. If the last digit is 0 then that's the check digit but if it's not (which it's not...
  8. Replies
    43
    Views
    3,320

    This is the last part of the problem. If you guys...

    This is the last part of the problem. If you guys can help at all you will be my freaking heroes: If the last digit in the total is 0, then the check digit is 0; otherwise subtract the last digit...
  9. Replies
    43
    Views
    3,320

    In class he was giving us examples with int...

    In class he was giving us examples with int arrays but the assignment itself just says array and doesn't specify. So I assume it would be fine
  10. Replies
    43
    Views
    3,320

    Camel-man, is that using an array though? That's...

    Camel-man, is that using an array though? That's the only option I have with the assignment
  11. Replies
    43
    Views
    3,320

    All I have right now is what you gave me earlier...

    All I have right now is what you gave me earlier pretty much


    #include <stdio.h>

    int main(void)
    {
    int a[12], i, sumEven, sumOdd, total;
    printf("Type in one number of the UPC code and...
  12. Replies
    43
    Views
    3,320

    I tried that and had it print out the total for...

    I tried that and had it print out the total for both sumEven and sumOdd and it's still counting the last digit in the array even with this
    for(i=0;i<11; i+=2)
  13. Replies
    43
    Views
    3,320

    Apparently the 12th digit in the array is not...

    Apparently the 12th digit in the array is not actually supposed to be counted. Is there a simple adjustment I can make so that this is the case with the code that's already written?
  14. Replies
    43
    Views
    3,320

    Haha man you are seriously awesome. I'm sorry for...

    Haha man you are seriously awesome. I'm sorry for being bothersome I just really want to get this done. Thank you for all the help
  15. Replies
    43
    Views
    3,320

    Okay this is what I have set up so far int...

    Okay this is what I have set up so far
    int a[12], i, sumEven, sumOdd, total, entry;
    printf("Type in one number of the UPC code and press enter");
    for(i=0;i<=12;i++){
    scanf("%d\n", &a[i]);}...
  16. Replies
    43
    Views
    3,320

    Sorinx, how would I go about doing that method?...

    Sorinx, how would I go about doing that method? Not to be a pain in the ass, but I'm pretty lost here. I've only been working with C for a few weeks now.
  17. Replies
    43
    Views
    3,320

    Yes I have to store 1 UPC code into an array and...

    Yes I have to store 1 UPC code into an array and then add the odd/even positions in the array. Will the for loop work for that?
  18. Replies
    43
    Views
    3,320

    Adding integers inside of an array

    I'm horrible at C and I have to write a program for class that's due tomorrow that has to do with UPC codes. Basically I'm supposed to prompt the user for a 12 digit UPC and then check to see if it's...
  19. Replies
    5
    Views
    6,290

    That's actually very interesting, thank you I'll...

    That's actually very interesting, thank you I'll add that in as well.
  20. Replies
    5
    Views
    6,290

    Okay, you two are my saviors. I changed from...

    Okay, you two are my saviors.

    I changed from int to double for fraction and total and wrote it like this:


    double fraction = 1.0 / i;
    double total = 0.0;

    Though I kept i as an int and my...
  21. Replies
    5
    Views
    6,290

    Adding fractions with a nested loop

    I was wondering if anyone can help me out with this. I'm new to C and I'm having a bit of difficulty with this problem:


    Write a program using nested loops that demonstrates the problem of...
  22. Replies
    5
    Views
    2,012

    I have rewritten the code and this is what I have...

    I have rewritten the code and this is what I have for now and I think my calculations are correct but the point of this problem is for me to learn how to use reference parameters and I know I'm not...
  23. Replies
    5
    Views
    2,012

    Reference Parameters help

    I'm not exactly the best when it comes to coding so I'm having some trouble right now. This is my problem:

    Determine the following information about a positive integer that is passed to
    a...
Results 1 to 23 of 23