Search:

Type: Posts; User: laurenlb

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    3,924

    Adding a node to linked list

    I have a function that is supposed to add a node to a linked list. I'm not sure what the other 2 parts of the for loop are for this. Can anyone help me figure those out? Also, is everything else I...
  2. Replies
    7
    Views
    1,920

    And how would you replace it with '\0'? This is...

    And how would you replace it with '\0'?
    This is what I have and it seems right. I just don't know how to replace the y with '\0'.



    if (strcmp(&string1[stringlength-1], "y")==0)
    {...
  3. Replies
    7
    Views
    1,920

    Removing characters from a string

    I'm learning strings and I have to write a program that (along with other things) takes a singular form of a noun and makes it plural. More specifically, the one I'm working with now is if the noun...
  4. Replies
    4
    Views
    8,620

    Thanks. I understand now.

    Thanks. I understand now.
  5. Replies
    4
    Views
    8,620

    Using scanf function with strings

    Im just starting to learn about strings. Right now I'm just trying to prompt the user to input multiple words and then use the scanf function. Since I am just learning strings there may be other...
  6. Replies
    25
    Views
    3,417

    I don't know much about recursive functions at...

    I don't know much about recursive functions at all, but so far i have this. Is this anything close to what i should have?




    int sum(int x, int y)
    {
    if (number=0)
    {
    return 0;
  7. Replies
    25
    Views
    3,417

    iterative vs. recursive

    I have this program that calculates the sum of the digits in a number but I have to make it recursive and i have no idea how a recursive function would even work for this kind of problem.
    Where...
  8. Thread: for loops

    by laurenlb
    Replies
    3
    Views
    2,943

    Thank you! that makes sense now. I was just...

    Thank you! that makes sense now. I was just assuming the that the first thing being printed was the result of the first inner loop. I didn't think it through that the first line was just completely...
  9. Thread: for loops

    by laurenlb
    Replies
    3
    Views
    2,943

    for loops

    I have this segment of a program that is supposed to print:

    0
    01
    012
    0123
    01234
    012345

    and it does that, but I don't understand why. The first time through the inner for loop b isnt less...
  10. Replies
    6
    Views
    6,692

    I'm still having a lot of trouble breaking the...

    I'm still having a lot of trouble breaking the number down into its digits. Can you help me out a little more with that part?
  11. Replies
    6
    Views
    6,692

    Is there another way to do it? We haven't learned...

    Is there another way to do it? We haven't learned strings yet so we are not supposed to incorporate them into this program.
  12. Replies
    6
    Views
    6,692

    Multiplying the digits of a number together

    i need to write a program where part of it is to see if the product of the digits in an inputed integer are odd or even. It has to return a 1 if odd and a 0 if it's even.

    i.e. if 73 is inputed,...
  13. Thread: Nested loops

    by laurenlb
    Replies
    5
    Views
    2,615

    Thanks to both of you. I finally figured it out.

    Thanks to both of you. I finally figured it out.
  14. Thread: Nested loops

    by laurenlb
    Replies
    5
    Views
    2,615

    I'm still not really getting anywhere. Can you...

    I'm still not really getting anywhere. Can you explain any differently/more specific how the 2 for loops would like?
  15. Thread: Nested loops

    by laurenlb
    Replies
    5
    Views
    2,615

    Nested loops

    I'm pretty new to programming and I have an assignment for class that I'm having trouble figuring out how to start.

    I have to use nested loops that will cause this to be displayed:

    0
    0 1
    0 1...
Results 1 to 15 of 15