Search:

Type: Posts; User: jannr

Search: Search took 0.00 seconds.

  1. Replies
    13
    Views
    1,206

    ahh,, that's right,, thanks a lot Matticus,, that...

    ahh,, that's right,, thanks a lot Matticus,, that clears things up,, ^^
  2. Replies
    13
    Views
    1,206

    Thanks Matticus! but why is it like that?

    Thanks Matticus! but why is it like that?
  3. Replies
    13
    Views
    1,206

    Hi again. what's wrong with this code? ...

    Hi again. what's wrong with this code?


    #include <stdio.h>
    #include <conio.h>

    int main(void)
    {
    char name[20];
  4. Replies
    13
    Views
    1,206

    Thanks!!

    Thanks!!
  5. Replies
    13
    Views
    1,206

    Thanks! then I'll just have to instruct the user...

    Thanks! then I'll just have to instruct the user only to enter alphabets,, ^^

    Thanks agen subhash.rao,, ^^
  6. Replies
    13
    Views
    1,206

    ahh,, It works!! Thanks! I thought that c won't...

    ahh,, It works!! Thanks! I thought that c won't recognize alphabets in counting. lol,, so here's another question, do this run on turbo c?
  7. Replies
    13
    Views
    1,206

    need advise on if statements

    Hi! I would like to seek advice or insights regarding this lengthy program that I made for an assignment and was wodering if it can be shortened or if there is something wrong with it, although it...
  8. Replies
    12
    Views
    1,334

    lol,, I forgot,, haha sorry,, ...

    lol,, I forgot,, haha sorry,,



    while(counter<=num1)
    {
    sum += num2;
    counter++;
    }
  9. Replies
    12
    Views
    1,334

    You could try this while loop: ...

    You could try this while loop:



    while(counter<=num1)
    {
    sum += num2;
    }
  10. Replies
    2
    Views
    1,464

    awts! that's it! thanks a lot laserlight!

    awts! that's it! thanks a lot laserlight!
  11. Replies
    6
    Views
    1,746

    you can put system("pause"); before...

    you can put



    system("pause");


    before return 0. it will pause the program.

    jannr
  12. Replies
    2
    Views
    1,464

    Need help on this while statement, thanks!

    I'm wondering if something is wrong with this code.

    the supposed output should be:



    Enter gallons consumed(-1 to end): -1
    //skips the miles prompt and ends the loop
    ...some code after...
  13. Replies
    21
    Views
    5,492

    hmm, I guess you're right. I am actually studying...

    hmm, I guess you're right. I am actually studying by myself in advance here on CProgramming.com and also reading the book that was provided to us, which is "C how to program".

    I'm quite far from...
  14. Replies
    21
    Views
    5,492

    Ahh,, Thanks for the info CommonTater. ...

    Ahh,, Thanks for the info CommonTater.

    However, I cannot use limits.h yet as we have not taken it up yet so I'll just stick to 0 this time but I would definitely try and use limits.h.
    Great...
  15. Replies
    21
    Views
    5,492

    Thanks CommonTater, initializing all the values...

    Thanks CommonTater, initializing all the values first will prevent having "undefined behavior"

    jannr
  16. Replies
    21
    Views
    5,492

    @Fader_Berg: If the user inputs all positive...

    @Fader_Berg: If the user inputs all positive numbers and you have initialized min to 0 then the value of min will always be 0 and the same with the max if all the numbers are in negative.
  17. Replies
    21
    Views
    5,492

    AH! I get it,, ok2,, so i just have to initialize...

    AH! I get it,, ok2,, so i just have to initialize both min and max with the first value! Thanks!!
  18. Replies
    21
    Views
    5,492

    yes but if I also initialize min, the smallest...

    yes but if I also initialize min, the smallest will always be 0 if the user do not enter a negative number.
  19. Replies
    21
    Views
    5,492

    Thanks! I've solved it! Here it is: [Edit]...

    Thanks! I've solved it!

    Here it is:

    [Edit]


    #include <stdio.h>
    #include <conio.h>
  20. Replies
    21
    Views
    5,492

    Btw, I solved the prob, I just have to initialize...

    Btw, I solved the prob, I just have to initialize max and I did not initialize min as it will make min = 0 the smallest number thus cannot be changed with the users input.

    Thanks all!!
  21. Replies
    21
    Views
    5,492

    Thank you very much! It was dumb of me not to...

    Thank you very much! It was dumb of me not to notice that. Thanks a lot guys!! ^^

    @caludiu: well, I can't really use loops though, I can only use if statements and nothing else,, hehe Thanks though
  22. Replies
    21
    Views
    5,492

    The typical Largest smallest number printing

    HI! I am a first year IT student and am facing a problem. I need to create a program that finds and prints the largest and smallest number of a series of 5 numbers inputted by the user. I already...
Results 1 to 22 of 22