hello, I am trying to produce a image using GD graphics library. I can succesfully display my image, however I cant display this image along with a printf function too, any ideas?
#include...
Type: Posts; User: SDH
hello, I am trying to produce a image using GD graphics library. I can succesfully display my image, however I cant display this image along with a printf function too, any ideas?
#include...
sorry i tried to cut out some of code so it wasnt as long, but I will just post the whole thing so its easier for you to read.
#include<stdio.h>int main(void)
{ int c;
int n;
int...
I am trying to write a poker hand score system. I have worked everything out except how to do full house and 2 two pair. Currently I scan through all 127 ASCII values, then if the code detects that...
I am so very close to finishing my programming but I still get the source to certain input from the user as different numbers. so when a user types in J the code will recognize it as 11, then queen...
I understand what you have mentioned above and am working on correcting that. However I am a bit confused what you have wrote inside the if statment, ( ch == 'j' ). What is ch?
I am trying to make a poker scoring code and am struggling a bit with the 'picture cards'. The user inputs the hand
for example 3c 7d 9h js ad
I have worked out nearly all of the source code,...
Just thought I would kep you updated, I have managed to get the code to work properly using a couple more loops and counts. Thanks for your help.
thanks for all the help you are giving me. For some reason it still wont work, where am going wrong on using bubble sort to sort both arrays?
#include<stdio.h>int main(void)
{
int c;
...
here is what I have come up with so far. Am I getting any closer?7
#include<stdio.h>int main(void)
{
int c;
int n;
int count1[127] = {0};
int count2[127] = {0};
I have an idea how to intialize it but I am not sure on where to put it in the code and how to write it in, any clues?
I have just added bubble sort to the code and that works perfect. Where in the code do I add the new array?
here is the code too
#include<stdio.h>int main(void)
{
int c;
int n;
...
ok thank you very much, what other method to work out a straight would you use instead?
Do I need to use bubble sort on the array first?
I understand how that code work, but do not know why that won't work for me. Is it because I have two arrays?
Ok thank you very much, I had trouble with an earlier version of the code and found that putting 127 elements in the array seemed to solve the problem, but have changed it to five now and its seems...
sorry I think I haven't explained what I want to do properly, I would like the difference to be calculate from the user input ( this will change every time). But what I am having trouble is using the...
I was going to use values of
10=ten
11=jack
12=queen
etc
I have tried to write code for it, and so far I have wrote this
#include<stdio.h>int main(void)
{
Sorry guys, I appreciate you trying to help me. I am trying to make a poker scoring system. So at the moment I am working on how to get straights, then from there I can combine it all together.
...
I am trying to get a program to read a set of numbers from user input, and then from there manipulate the numbers and display messages depending on what numbers are present.
For consecutive...
Thanks for your advice inbetween posting and reading your post I have managed to solve my problem! Thank you very much for the time you have put in helping me out! how would go about setting it up...
Just to help you I think has something to do with this part of the code,
for (c = 0; c < n; c++) { scanf(" %c %c ", &array[c], &array1[c]); because if i alter the %c the output will change.
This is the version that will not work on the online compiler. What ever the input it alwaysgives an output of 'Four of a kind'. Have I got the way it displays the hand set up correctly.
I would...
I have run my code on the compiler you gave me to into the link. But any ideas of why my code still wont work? I'm stuck for ideas now
AndiPersti - that is possible thanks, any that you would recommend?
c99tutorial - thank you very much for helping me lay it out in the correct format. And for also pointing out the problem with the...
I am so very close to it working now, I think I have sorted out the curly brace issue, correct me if I am wrong though ( will post code in a minute ). However I still am unable to get it to...