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...
Type: Posts; User: andynov123
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...
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...
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...
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 },...
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...
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 );...
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...
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...
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.
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...