Search:

Type: Posts; User: strictlyC

Search: Search took 0.00 seconds.

  1. Replies
    41
    Views
    4,472

    Why not just create two char arrays? char...

    Why not just create two char arrays?


    char a1[] = "Available";
    char a2[] = "NotAvailable";

    And have your condition just call the one thats needed?
    And if your worried about the space just...
  2. Replies
    9
    Views
    1,071

    if(isdigit(getchar()) { } else { } perhaps...

    if(isdigit(getchar())
    {
    }
    else
    {
    }
    perhaps something like that?
  3. LOL, Two forums and he gets almost the same...

    LOL, Two forums and he gets almost the same responce... I did write why it was doing it but it's so simple I edited in my first post. I'm still not going to say why cause it's so simple being pointed...
  4. Replies
    9
    Views
    31,839

    2 the number is even ...

    2 the number is even
    924 is divisible by 2 since
    924 is even.

    3
    The sum of the digits is divisible by three
    924 is divisible by 3...
  5. while (counter + n_started < 1025)

    while (counter + n_started < 1025)
  6. Replies
    3
    Views
    975

    Have you been able to use allegro for anything...

    Have you been able to use allegro for anything else?
    What I'm asking is Are you sure you installed it right?
    If you have are you sure you set the compiler to find allegro where it suppose to be?
  7. Replies
    3
    Views
    1,072

    You can simply check them both at the same time....

    You can simply check them both at the same time.


    if(i < 10 && c == '\0')
    {
    //if both are true then code gets executed
    // if either one is false then no code
    // between the { and }...
  8. Well hope you at least addressed the problem of...

    Well hope you at least addressed the problem of not being able to enter a even height
    i.e 5 ft., 6 ft. Good luck.
  9. Replies
    11
    Views
    1,326

    #include void smile (void) { ...

    #include <stdio.h>

    void smile (void)
    {
    printf("Smile!");
    }

    int main (void)
    {
    for(int i = 6; i != 0; --i)
  10. Replies
    11
    Views
    1,326

    #include void smile(int i); int...

    #include <stdio.h>

    void smile(int i);

    int main (void)
    {
    smile(6);
    }
  11. Replies
    11
    Views
    1,326

    #include void smile(void); //...

    #include <stdio.h>

    void smile(void); // Function prototype ; required if you put your functions
    //after main

    int main (void)
    {
    int count1;
    int count2;
  12. Just for fun: printf("Your height is: %.0f...

    Just for fun:



    printf("Your height is: %.0f feet and %d %s."
    , (height/12)-.5
    , (int)height-((((int) height)/12)*12)
    , ((int)height-((((int) height)/12)*12)) != 1...
  13. Well it would be better in my opinion. Also I...

    Well it would be better in my opinion. Also I would make it so they was a limit on max number of inches you could enter/ and max number of height (no ones over 8 foot are they? 8 foot 24 inches? How...
  14. Your original post: And again I will...

    Your original post:





    And again I will refer you to my responce
  15. I guess I'll hit on what others didn't. You have...

    I guess I'll hit on what others didn't. You have to use a format specifier in the printf() statement to have it display the correct number of decimal places.

    printf("%.3f", BMI); would produce a...
  16. Replies
    5
    Views
    924

    You should go to a notepad/ ide and play with all...

    You should go to a notepad/ ide and play with all the source code you only read.
    Start with around chapter 3 and do all examples in the books till the end. Then do all the exercises also.
    You can't...
Results 1 to 16 of 17