Search:

Type: Posts; User: Extropian

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    2,399

    I'm so close to being done with my code for this...

    I'm so close to being done with my code for this one but my function is only retuning 2.000. I really wrapped my brain around this one and can't seem to figure out why it won't work.

    Any thoughts?...
  2. Replies
    10
    Views
    2,399

    Thank you very much tonto I'm sure this will...

    Thank you very much tonto I'm sure this will help, I'll compare your code to mine and see if I can fix it.
    The only difference is it shoud only output:
    Car Hours Charge
    0 ...
  3. Replies
    10
    Views
    2,399

    Comments like thisdont help me, note the rules: ...

    Comments like thisdont help me, note the rules:


    "Keep in mind that being helpful does not give license to be rude."

    I normally wouldn't care but I get this all the time...


    To the people...
  4. Replies
    10
    Views
    2,399

    A little question about formatted output

    Just wondered if this will put the titles in tabular format:

    printf("%13s%13s%13s\n", "Car", "Hours", "Charge");

    if not, what's wrong with it?
    thanks,
    Extro
  5. Replies
    11
    Views
    967

    Thanks, that ssemed to work but now I have the...

    Thanks, that ssemed to work but now I have the error:
    too few arguments to function 'calculateCharges'


    printf("%13d%13%13f\n," , car, stay , calculateCharges(charge) );

    Thank for all the...
  6. Replies
    11
    Views
    967

    Ok I foxed that but now 'stay' is undeclared. Can...

    Ok I foxed that but now 'stay' is undeclared. Can I carry it over into the function somehow?
  7. Replies
    11
    Views
    967

    I got some working code but I'm getting a syntax...

    I got some working code but I'm getting a syntax error right at the end, any thoughts onw aht could be wrong would be a big help
    Thanks,
    Extro



    include<stdio.h>
    float calculateCharges...
  8. Replies
    11
    Views
    967

    I wanted it to be car

    I wanted it to be car <=3 but it says operator has no effect(on the stay argument too):



    int stay;
    int car = 0;
    float charge;
  9. Replies
    11
    Views
    967

    Something wrong with my for statement

    I'm getting three or four errors in thi sone statement...?? I can't for the life of me see what they could be.



    int stay;
    int car = 0;
    float charge;
  10. Replies
    4
    Views
    2,406

    Thank you

    Thank you
  11. Replies
    4
    Views
    2,406

    Yup, didnt work, just wondered if I can out an if...

    Yup, didnt work, just wondered if I can out an if statement in a user-defined function
    Thanks,
    Extro
  12. Replies
    4
    Views
    2,406

    New to user defined functions

    Can I put if statements in a user defined function?
    (You just know more questions about this assignment will be coming...hehe) ;)

    Thanks,
    Extro
  13. Replies
    20
    Views
    12,511

    Well I got it to work with fflush(stdin) and so I...

    Well I got it to work with fflush(stdin) and so I think it's best to leave well enough alone. Also, I dont wanna get too much into into c commands and functions we havent covered or he(my teacher)...
  14. Replies
    20
    Views
    12,511

    I got it to work! here's the code: #include...

    I got it to work! here's the code:


    #include <stdio.h>
    int main()
    {


    char pay;
    float salary_1;
  15. Replies
    20
    Views
    12,511

    I appreciate the help but being a first year...

    I appreciate the help but being a first year student I haven't yet been taught things like fflush so IU'm not sure how to work with it. I went with a do...while and I'm still getting
    Please enter...
  16. Replies
    20
    Views
    12,511

    Ok I fixed the code up a bit but its still not...

    Ok I fixed the code up a bit but its still not asking for another code, its just waiting for one. How do I get it to ask again?
    Thanks for all the help.



    #include <stdio.h>
    int main()
    {
  17. Replies
    20
    Views
    12,511

    I still don't understand why 'Please enter a...

    I still don't understand why 'Please enter a paycode(Enter -1 to end): ' would come up twice one immediately following the other when its done the first case, like this:
    Please enter a paycode(Enter...
  18. Replies
    20
    Views
    12,511

    Ok here's the working code I have a couple of...

    Ok here's the working code I have a couple of questions about:




    #include <stdio.h>
    int main()
    {
  19. Replies
    20
    Views
    12,511

    ok cool, thanks - but I still have a logic error....

    ok cool, thanks - but I still have a logic error. Here's the code.
    the problem is in case 2:




    #include <stdio.h>
    int main()
    {
  20. Replies
    20
    Views
    12,511

    A nested if inside the switch

    here's the code(roughly of course), wondered if it can be done:



    Case ‘2’:
    /*Find hourly workers salary */

    Printf “Please enter hours worked”
    Scanf(%d, &hours)
    Printf (“Please enter...
  21. Replies
    6
    Views
    2,161

    Gnu indent? lol, ya lost me... :confused:

    Gnu indent?
    lol, ya lost me... :confused:
  22. Replies
    6
    Views
    2,161

    I got it to work but any feedback is appreciated...

    I got it to work but any feedback is appreciated -can I make it better?(constructive criticism welcome).
    Regards,
    Extro




    int num1, num2;
    int integers; /* How many numbers the user...
  23. Replies
    6
    Views
    2,161

    Getting the loop control form the user

    A quick question:

    Normally I've seen that the programmer sets the loops control variable for a for statement. How does one get the user to set it?
    Thanks,
    Extro
  24. Replies
    4
    Views
    1,144

    Cool, got the code to work: #include...

    Cool, got the code to work:



    #include <stdio.h>


    int main()
    {
    float balance, charges, credit, limit;
  25. Replies
    4
    Views
    1,144

    Ya I did and it almost works, if I use a -1 right...

    Ya I did and it almost works, if I use a -1 right away it runs throough one more time, whwn it should just end it. Here's the changed code:


    #include <stdio.h>


    int main()
    {
    float...
Results 1 to 25 of 69
Page 1 of 3 1 2 3