Search:

Type: Posts; User: rightbrainer

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,435

    Ah I was SO close. :) I had it: but now I...

    Ah I was SO close. :) I had it:



    but now I see why that does not work.

    Thanks all!!
  2. Replies
    7
    Views
    1,435

    Ok that made me think. Thank you :) Ok so I...

    Ok that made me think. Thank you :) Ok so I re-thought my solution and I changed it to:


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

    int main(int argc, char *argv[])
    {
    float inches,...
  3. Replies
    7
    Views
    1,435

    Ah! Ok got it. Next step. Why isn't the math...

    Ah! Ok got it. Next step. Why isn't the math working now?


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

    int main(int argc, char *argv[])
    {
    float inches, centimeters=2.54;
    printf("Enter inches:...
  4. Replies
    7
    Views
    1,435

    Is there anything wrong with this code?

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

    int main(int argc, char *argv[])
    {
    int inches, centimeters=2;
    printf("Enter inches: ");
    scanf("%d, &inches");
    printf("%d inches equals %d centimeters",...
  5. Replies
    7
    Views
    15,579

    "Well then programming isn't the thing for you.."...

    "Well then programming isn't the thing for you.."

    Ironic; I'd say given your lack of patience, TEACHING isn't for YOU.

    In any case, I got it...


    #include <stdio.h>
    #include <cs50.h>
  6. Replies
    7
    Views
    15,579

    Sorry I don't follow either reply.

    Sorry I don't follow either reply.
  7. Replies
    7
    Views
    15,579

    Creating a half pyramid

    Hello all!

    I have a problem I need help with. I am tasked with creating a half pyramid like below. First I prompt user to enter an integer less than 23 to dictate how many asterisks in height the...
  8. Thanks but way beyond me at this early stage

    Thanks but way beyond me at this early stage
  9. Elysia, thanks for the feedback. I realize the...

    Elysia, thanks for the feedback. I realize the indentation is bad. I will clean it up. Thanks for your help and insight
  10. Ahhh you are good Elysia :) I added loops now...

    Ahhh you are good Elysia :) I added loops now and it works!! I have updated the code in prev post
  11. For the record there was nothing wrong with the...

    For the record there was nothing wrong with the getFloat function. Here is the completed, working bmi program. I am certain there are easier ways to do this rather than spell everything out...
  12. Replies
    2
    Views
    1,200

    How to program this math problem

    Hello cprogramming.com world! :P

    How do I write this math problem in my code?

    X divided by Y to the second power multiplied by 703?

    I tried:


    total=(x / y^2) * 703);
  13. quzah, thanks. I did that and it shows all zeroes...

    quzah, thanks. I did that and it shows all zeroes for values
  14. Getting closer aren't I? Problem now is that all...

    Getting closer aren't I? Problem now is that all values are coming back "0" so the calculation is not working.

    help




    #include <stdio.h>
    #include <cs50.h>
  15. Ok now I get that part... so I need to change all...

    Ok now I get that part... so I need to change all INT references to FLOAT (there is also a getFloat function in the cs50.h header). Is this right? What else is now wrong?



    #include <stdio.h>...
  16. Any C experts interested in tutoring me?

    I posted this to Craig's List and will post it here as well:

    Hello, I am taking a C Programming course online. I am doing OK, but I need an experienced guru to help me along, review my...
  17. hk.. thanks! It compiles and runs! Problem is now...

    hk.. thanks! It compiles and runs! Problem is now that no matter what values I enter it says "you are under weight"

    I suspect this is because I am not handling decimal points..?? Problem is, I...
  18. When I try to compile this, I get an error. The...

    When I try to compile this, I get an error. The error is "In function main, called object on line 27 is not a function" . Line 27 is: totalHeight = (feet * inchesPerFoot) + inches;)

    Next error...
  19. Elysia, I already told you getInt is in the cs50...

    Elysia, I already told you getInt is in the cs50 header I am including. Here it is for the record:


    int
    GetInt()
    {
    // try to get an int from user
    while (true)
    {
    // get...
  20. My new and improved code!

    Ok granted it's still hosed, but with more research I think I improved it a lot.... or maybe not? I still need to figure out how to get the loop in here in case they enter a negative number.. and...
  21. Hi all, and thanks for responding. Please...

    Hi all, and thanks for responding. Please understand, I am a complete beginner. The course is a complete beginner's course. I have zero programming experience. The instructor covered loops, floats,...
  22. n00b tackles another problem set, needs more help :\

    Thanks for your patience with me. I know these messages are probably annoying. Thanks for bearing with me.

    So my new assignment is as follows:



    I have read the lecture material repeatedly as...
  23. Replies
    3
    Views
    1,102

    Adak, thank you so much! It works. :) Ok so...

    Adak, thank you so much! It works. :)

    Ok so let me see if I have this right (don't laugh!)


    #include <stdio.h>
    #include <cs50.h>

    int
    main(int argc, char * argv[])
  24. Replies
    3
    Views
    1,102

    n00b needs help with small program

    Hello all

    I have always wanted to learn to program. I have started and quit many times. it is tough as a self-taught student. I found a good online course recently. I intend to see it through. ...
Results 1 to 24 of 25