Search:

Type: Posts; User: jpatrick

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    1,757

    well thanks for the help. i'm pretty sure i...

    well thanks for the help. i'm pretty sure i understand it now. i'm assuming things might get a little complicated with all the numbers changing so i'll just have to keep track of everything on paper....
  2. Replies
    9
    Views
    1,757

    i see. so then the next value would be a=1,...

    i see. so then the next value would be a=1, 1-1=0, and 8 is at the 0 value but it has been replaced by 4? so the second value is 4? is that how it works?
  3. Replies
    9
    Views
    1,757

    for more clarification.. here's another example...

    for more clarification.. here's another example that i can't figure out with the same logic because it is a different type of problem..


    int main() {
    int a[] = {8, 1, 6, 3, 5, 7,...
  4. Replies
    9
    Views
    1,757

    i know bigH. i was rushing :) sorry lol. but rest...

    i know bigH. i was rushing :) sorry lol. but rest assured i fixed it in codeblocks.. i copied and pasted this from a powerpoint.
  5. Replies
    9
    Views
    1,757

    i do understand better now; I mean, i see how you...

    i do understand better now; I mean, i see how you got the output, at least. i guess i was confusing myself after looking at i=0 so my thought process was something like this: since i=0 then 0+0+1=0...
  6. Replies
    9
    Views
    1,757

    need help understanding basic arrays

    Hey everyone..

    So i'm adding arrays to the already long-enough list of C concepts that i don't understand. I looked at the tutorial on this site and i've googled for info on arrays; nothing i have...
  7. Replies
    5
    Views
    1,029

    fair enough. thanks for the help

    fair enough. thanks for the help
  8. Replies
    5
    Views
    1,029

    no, that makes sense.. i'll just throw all the...

    no, that makes sense.. i'll just throw all the code down. The assignment is to have the program assign a random cost of $5-$20 for used games and $25-50 for new games.



    int main() {
    int...
  9. Replies
    5
    Views
    1,029

    for loop/counter error

    Hey everyone.

    Writing some code and i'm having a little problem with my for loop. the program is only supposed to output 3 lines of code (all different random prices). However, the first price is...
  10. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    i figured it out. it was really simple i was just...

    i figured it out. it was really simple i was just being neglectful and not really paying super close attention.

    i really appreciate your help and patience holding my hand, Flame of the West.
  11. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    the variable i was using for up to 40 hours of...

    the variable i was using for up to 40 hours of regular pay previously was weekly_pay. but weekly_pay = weekly_pay +overtime pay doesn't make any sense. While i understand that it doesn't make any...
  12. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    This is where i'm at now. int main() { ...

    This is where i'm at now.


    int main() {
    int num_hours_worked, employee_type, overtime_hours_worked;
    float weekly_pay, overtime_pay, pay_rate;

    printf("Are you and hourly employee...
  13. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    right. it stops working after 75 because 40 goes...

    right. it stops working after 75 because 40 goes into 80+ at least twice so the remainder resets.
  14. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    for some reason, i didn't think to use...

    for some reason, i didn't think to use subtraction...

    i was initially thinking that using the mod would take, for example, 46 and divide it by 40, which would go into once and have a remainder of...
  15. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    i'm an idiot.. think i got it now

    i'm an idiot.. think i got it now
  16. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    yes i now have printf("You will get paid $%f...

    yes i now have
    printf("You will get paid $%f this week.\n", weekly_pay); only once below the entire if/else statement. I now realize my boneheaded mistake of having pay_rate as an integer instead...
  17. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    i put all of this printf("Are you and hourly...

    i put all of this


    printf("Are you and hourly employee (1) or a manager (0)?\n");
    scanf("%d", &employee_type);

    printf("How many hours did you work this week?\n");
    scanf("%d",...
  18. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    Hey this is a different bit of code. but i'm...

    Hey this is a different bit of code. but i'm having some issues with the math.



    int main() {
    int num_hours_worked, pay_rate, employee_type, overtime_hours_worked;
    float weekly_pay_1,...
  19. Replies
    13
    Views
    2,607

    figured it out. thanks a ton

    figured it out. thanks a ton
  20. Replies
    13
    Views
    2,607

    quick question. When i compile and run the...

    quick question. When i compile and run the program with codeblocks, it will stay open until i close it, but if i run the .exe file by itself and type in the answer to the prompt, the program closes...
  21. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    I actually had it right but i had an extra curly...

    I actually had it right but i had an extra curly brace that i didn't notice in there and i didn't notice so i just assumed i was doing it wrong =\
  22. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    what are the correct places to put the braces?

    what are the correct places to put the braces?
  23. Thread: else/if error

    by jpatrick
    Replies
    22
    Views
    2,388

    else/if error

    hey everyone,

    writing a little program and i'm getting an error that says 'else without a previous if'.




    char ans_one, ans_two, ans_three, months_experience;

    printf("Have you...
  24. Replies
    13
    Views
    2,607

    thank you kindly.. i'll get to work on that today

    thank you kindly.. i'll get to work on that today
  25. Replies
    13
    Views
    2,607

    what do those changes do exactly? and what...

    what do those changes do exactly?

    and what does that (a graphics/video library) entail?
Results 1 to 25 of 40
Page 1 of 2 1 2