Search:

Type: Posts; User: _jamie

Page 1 of 5 1 2 3 4

Search: Search took 0.02 seconds.

  1. 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',...
  2. 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.
  3. Thread: atoi & scanf

    by _jamie
    Replies
    7
    Views
    427

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

    Looks good, thanks to all those that helped! Great to be back on the forum!
  4. 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...
  5. Thread: atoi & scanf

    by _jamie
    Replies
    7
    Views
    427

    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.
  6. Thread: atoi & scanf

    by _jamie
    Replies
    7
    Views
    427

    atoi & scanf

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


    int main(void)
    {
    char input[100];
    int z;
  7. Replies
    2
    Views
    305

    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';
  8. Replies
    2
    Views
    305

    start var at 0 or 1

    #include <stdio.h>

    int i, p;


    char letter_a = 'A';


    int main (void)
    {
  9. Replies
    3
    Views
    2,739

    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;
  10. Replies
    3
    Views
    2,739

    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...
  11. Replies
    6
    Views
    884

    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"
  12. Replies
    6
    Views
    884

    this fixed it #include #include...

    this fixed it


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


    int main(void)
  13. Replies
    6
    Views
    884

    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
  14. Replies
    6
    Views
    884

    Simple do { while () loop entire program

    Program code:




    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <ctype.h>
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
  21. 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:
    ...
  22. This square root method is wrong (a = 500, b =...

    This square root method is wrong (a = 500, b = 500, c = 1000 is not a valid triplet). This is my second attempt. My first attempt seems to be the correct method but I deleted the source code but it...
  23. float ret fixed it

    float ret


    fixed it
  24. quick question passing data types for square root function (function parameters)

    hey all i've already worked through the math of this problem and i'm ready to start the code but please i'm just getting 0.000 when I compile this program, I believe it's an issue with the...
  25. This code works #include #include...

    This code works


    #include <stdio.h>
    #include <stdbool.h>


    int main ()
    {
    int p = 2;
Results 1 to 25 of 122
Page 1 of 5 1 2 3 4