Search:

Type: Posts; User: _jamie

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Simple for loop game engine please with break (simple question)

    // game_loop_test.c


    #include <stdio.h>


    int main()
    {
    // Repeat block of three printf to console three times then break
  2. working on a project, hey forum, it's good to be back, computer programming problem

    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>


    #define GUESS_COUNT 3



    https://kodekata.net/hangman.html
  3. thanks, looks good, and works great.

    thanks, looks good, and works great.
  4. function program, return value to remove warning message (math.h)

    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>

    double sqrt_function (double number);

    int main (void)
    {
    double val;
    double p = 0;
  5. Error in loop, simple program error, replace int with int

    #include <stdio.h>
    #define LIMIT_2 28

    /* j, k, l, m, n, o */

    int main (void)
    {
    int p = 0;

    char alphabet[LIMIT_2] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',...
  6. looks good Malcom, I will study this code...

    looks good Malcom, I will study this code tonight. Great use of the use of assert() function, thanks.
  7. Thread: atoi & scanf

    by _jamie
    Replies
    7
    Views
    3,972

    Looks good, thanks to all those that helped!...

    Looks good, thanks to all those that helped! Great to be back on the forum!
  8. please, what is the best way to assign int's to a char array ?

    char alphabet_string[CHAR_COUNT][26] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '\0' };



    Please, pseudo...
  9. Thread: atoi & scanf

    by _jamie
    Replies
    7
    Views
    3,972

    T This actually isn't what I want. I wanted to...

    T

    This actually isn't what I want. I wanted to write a program to convert CHAR into ASCII code.
  10. Thread: atoi & scanf

    by _jamie
    Replies
    7
    Views
    3,972

    atoi & scanf

    #include <stdio.h>
    #include <stdlib.h>


    int main(void)
    {
    char input[100];
    int z;
  11. Replies
    2
    Views
    2,144

    here this is the final program, with the format...

    here this is the final program, with the format specifiers and the => operator



    #include <stdio.h>


    char letter_a = 'A';
  12. Replies
    2
    Views
    2,144

    start var at 0 or 1

    #include <stdio.h>

    int i, p;


    char letter_a = 'A';


    int main (void)
    {
  13. Replies
    3
    Views
    8,830

    Thanks Structure, took a few days for someone to...

    Thanks Structure, took a few days for someone to post. Looks like I was just missing that one line:



    successful_tries = 0;
  14. Replies
    3
    Views
    8,830

    Simple reset counter on for loop

    Please, if you have the time and run and compile this program, I am looking for further instruction from someone on game_loop variable to countdown from 3 to 0 (reset it). I've tried with a while...
  15. Replies
    6
    Views
    3,391

    alright thanks, i worked through that problem,...

    alright thanks, i worked through that problem, i'm working on a new problem tonight, will paste soon. Also, i missed your typo "for int count"
  16. Replies
    6
    Views
    3,391

    this fixed it #include #include...

    this fixed it


    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <ctype.h>


    int main(void)
  17. Replies
    6
    Views
    3,391

    thanks Jim. Yes i forgot to run gcc with -Wall...

    thanks Jim. Yes i forgot to run gcc with -Wall now I see "chosen" is an int not a %ld also count is counting down a max of 3 loops
  18. Replies
    6
    Views
    3,391

    Simple do { while () loop entire program

    Program code:




    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <ctype.h>
  19. This code works, this just about finishes the...

    This code works, this just about finishes the first part of the exercise. I removed the if() and else if() statements inside the else if () statement under the matching (input != num) which was...
  20. Please help, wouldn't mind a few suggestions, I...

    Please help, wouldn't mind a few suggestions, I know I could just sit here and play with the loops, the whole chapter is on loops (Chapter 4), but I was thinking, is this correct:



    else if...
  21. This is what I came up with...there are a few...

    This is what I came up with...there are a few bugs, and i'll work on it more tomorrow. Any suggestions running it through gdb? That's my next step, using gdb.



    /* Chapter 4 Exercise from C...
  22. Thanks for the followup Hodor, I misread the...

    Thanks for the followup Hodor, I misread the Exercise question. Looks like the book wasn't asking for a 9 digit number, that would be beyond my capabities and isn't mentioned in the Chapter, also I...
  23. Hey all, i believe the scanf() function is...

    Hey all, i believe the scanf() function is getting confused with a for loop or the delay() function resulting in a confused scanf() function, resulting in there being no exact match for the if...
  24. I ran the code through gdb couldn't make sense...

    I ran the code through gdb couldn't make sense out of it, complained about line 13 though and kept showing random numbers


    Thanks Salem for the post. Look at this code (this program finds a...
  25. segmentation fault (if input == var) program compiles

    Hey all, this exercise is out of "Beginning C 5th Edition" and it's much easier than working through the Project Euler problems but I am still working on them too. Here is the exercise question:
    ...
Results 1 to 25 of 126
Page 1 of 6 1 2 3 4