Search:

Type: Posts; User: PhantomJoe

Search: Search took 0.01 seconds.

  1. Replies
    41
    Views
    32,169

    So I'm really close. Here's my updated code. ...

    So I'm really close. Here's my updated code. I've got the back and forth in there but it's not working quite right. The player 1 button-press doesn't work but the player 2 button-press is working...
  2. Replies
    41
    Views
    32,169

    Met again with my teacher tonight and while I...

    Met again with my teacher tonight and while I wasn't a whole lot wrong in terms of needing to rewrite tons of code I did have a fundamental error in the while condition. It should have been joined...
  3. Replies
    41
    Views
    32,169

    I see that I had return 0 in the wrong place so...

    I see that I had return 0 in the wrong place so thank you for that. I've moved it and made a few other changes like changing the condition for the while loop and adding a check for score total right...
  4. Replies
    41
    Views
    32,169

    Thank you for the tip. I barely know what I'm...

    Thank you for the tip. I barely know what I'm doing but I will certainly try to remember this point.
  5. Replies
    41
    Views
    32,169

    I've added some comments to your reply to address...

    I've added some comments to your reply to address each of your points to help me organize my thoughts.
  6. Replies
    41
    Views
    32,169

    Also, the chars toPlay1 and toPlay2 were added...

    Also, the chars toPlay1 and toPlay2 were added thinking I would need 2 variables for each player for the button press piece of the code. I.e. - "Player press 'a' to roll your dice or press 'q' to...
  7. Replies
    41
    Views
    32,169

    Again, thank you for the tip. I've incorporated...

    Again, thank you for the tip. I've incorporated the use of total as a variable in place of the 2 variables I had been using. I've also corrected the issue where Player 1's score was never printing...
  8. Replies
    41
    Views
    32,169

    This was helpful, it helped me see that the issue...

    This was helpful, it helped me see that the issue with the Player 2 code being left outside the loop and that was an easy fix so thank you.

    Here's what it looks like now.


    int main()
    {...
  9. Replies
    41
    Views
    32,169

    The loop condition in the while statement,...

    The loop condition in the while statement, doesn't that need each argument to be separated with an "OR" or did I misunderstand?

    while (quit != 'q' || My_result < 50 || Your_result < 50)
    So...
  10. Replies
    41
    Views
    32,169

    So here is my new code. The good news is it does...

    So here is my new code. The good news is it does compile but the bad news is it appears to be an infinite loop that never gets past the player 1 portion of the code.

    The goal is to have each...
  11. Replies
    41
    Views
    32,169

    Yes, we haven't learned about switch. I did meet...

    Yes, we haven't learned about switch. I did meet with my teacher tonight and got a good deal of help. I'll post my new code tomorrow and hopefully get some feedback here.
  12. Replies
    41
    Views
    32,169

    First off thank you for the tip on printf, that...

    First off thank you for the tip on printf, that looks much cleaner.

    Secondly, for the inner while loops you recommended, do I need to have an additional variable that identifies user 1 and user...
  13. Replies
    41
    Views
    32,169

    Dice Game (Fifty)

    I'm working to write a program that will allow 2 players to play the dice game called "Fifty".

    I apologize if this has been covered in another post but I did spend the last hour looking through...
  14. Replies
    17
    Views
    7,142

    Can you explain with this printf statement is...

    Can you explain with this printf statement is doing? printf("%*c",space,'*');

    I understand that the %c is identifying the data type that will be printed but I'm not sure I understand what the...
  15. Replies
    17
    Views
    7,142

    Hi Salem. So I think I figured out the right...

    Hi Salem. So I think I figured out the right code to get your above output:


    int main()
    {
    int row;
    int col;
    int numspaces;

    for (row = 4; row >= 0; row--)
  16. Replies
    17
    Views
    7,142

    I know I need to incorporate the logic you laid...

    I know I need to incorporate the logic you laid out to get the correct number of asterisks (row*2-1) but because I'm unsure of how to implement that I've just been trying to insert it in different...
  17. Replies
    17
    Views
    7,142

    Lol, so I've tried all kinds of changes to the...

    Lol, so I've tried all kinds of changes to the for loop for columns but I either wind up printing a single asterisk or I create an infinite loop with infinity asterisks.
  18. Replies
    17
    Views
    7,142

    In the first row I need 3 leading spaces, in the...

    In the first row I need 3 leading spaces, in the second row I need 2 leading spaces, and in the third row I need 1 leading space (and no leading spaces for the 4th row). I'll be honest, I'm really...
  19. Replies
    17
    Views
    7,142

    Mathematically I understand your logic. 2*rows...

    Mathematically I understand your logic. 2*rows -1 will give me the correct number of asterisks per row (2*1-1=1 and 2*2-1=3 and so on) but how do I account for the leading blank spaces?
  20. Replies
    17
    Views
    7,142

    I think I also neglected to mention that I am...

    I think I also neglected to mention that I am also struggling to find the right code that will also give me the correct number of asterisks per row.
  21. Replies
    17
    Views
    7,142

    Printing a pattern to the screen

    Hi everybody. I'm in my first programming course ever and have a few questions about an assignment that we've been given.

    I'm trying to print the following pattern to the screen:
    15235

    The...
  22. This was exactly what I was overlooking. When I...

    This was exactly what I was overlooking. When I replace all the assignment operators with comparison operators the program returns just the one line that corresponds to the entry from the end user. ...
  23. New to C Programming - College Course (first assignment)

    Hi all,

    I'm new to programming and so naturally am new to the C programming language. I'm taking a college course (Intro to C Programming) and am working through my first assignment. I thought I...
Results 1 to 23 of 23