Search:

Type: Posts; User: andynov123

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    1,410

    I'm confused. whats telling it to take only one...

    I'm confused.
    whats telling it to take only one character in. I thought the 12 in this code meant characters.



    char arr[3][12]= { "word", "word1", "word2" };

    So how would you take in more...
  2. Replies
    7
    Views
    1,410

    Ok here it is my problem is that when I take the...

    Ok here it is
    my problem is that when I take the input of arr[0] and then printf. Instead of displaying apple as the replaced word like you see in the pic it says aord. It only takes in the first...
  3. Replies
    7
    Views
    1,410

    I want to scanf 16 different words and put them...

    I want to scanf 16 different words and put them in a 2d array.


    #include <stdio.h>
    #include <conio.h>
    void main() {
    clrscr();
    char arr[3][12]= { "word", "word1", "word2" };
    printf("Array of...
  4. Replies
    7
    Views
    1,410

    Help With 2D Array

    How would I change this 2D Array so that instead of numbers are stored in it, words are stored. I want to scanf the words and store the words in the 2d array.




    int two_d[2][3] = {{ 5, 2, 1 },...
  5. Replies
    16
    Views
    2,138

    I cleaned up my code and ran it and one other...

    I cleaned up my code and ran it and one other problem is that I play 18 quarters at the end when I have 17 quarters left. See pic for reference
    And GReaper slot machine 1 is only supposed to pay...
  6. Replies
    16
    Views
    2,138

    Oh Ok. Well I got the sleep function working now,...

    Oh Ok. Well I got the sleep function working now, but now I'm starting with more than 1000 quarters instead of a 1000 quarters.


    #include <stdio.h>
    #include <windows.h>
    int slot1(int, int );...
  7. Replies
    16
    Views
    2,138

    I've never used the sleep function before. When I...

    I've never used the sleep function before. When I place in my program I just return errors. Is this the wrong place for the function after
    "printf ("You have %d quarters left\n", quarters);"?
    And...
  8. Replies
    16
    Views
    2,138

    I removed a bunch of commented out code and...

    I removed a bunch of commented out code and winnings =25, winnings =75 and winnings =7. Not sure if this is what you meant but it countdowns the quarters at 196 now. Is that what you meant? Code...
  9. Replies
    16
    Views
    2,138

    Thanks for the suggestion. Changing result to a...

    Thanks for the suggestion.
    Changing result to a double didn't do anything in regards to starting quarter countdown at 1000 like it was set to be.
  10. Replies
    16
    Views
    2,138

    C Program Not Properly Calculating

    I'm writing a slot machine program where you are supposed to start with 1000 quarters but for some reason its counting down from some random number higher than the quarters=1000; I declared. The...
Results 1 to 10 of 10