Search:

Type: Posts; User: greenberet

Search: Search took 0.02 seconds.

  1. Replies
    3
    Views
    1,431

    I think you can use the c++ getch() with accepts...

    I think you can use the c++ getch() with accepts a character without displaying it.
  2. Replies
    10
    Views
    4,782

    thanks Salem now i got a clearer picture of scanf.

    thanks Salem now i got a clearer picture of scanf.
  3. Replies
    10
    Views
    4,782

    char c; while(scanf("%c\n",&c)==1 && c=='y')...

    char c;
    while(scanf("%c\n",&c)==1 && c=='y')
    printf("Hello");

    //or

    char c;
    while(scanf("%c\n",&c), c=='y')
    printf("Hello");
  4. Replies
    1
    Views
    1,194

    well you're defining the formal argument to the...

    well you're defining the formal argument to the det function (i.e n) with the same name as the constant
    you defined.
    i.e #define n
  5. Replies
    10
    Views
    4,782

    all right here is the modified code but it still...

    all right here is the modified code but it still produces strange results. It doesn't work the first time you press y\n but the second time onwards it works



    char c;...
  6. Replies
    10
    Views
    4,782

    the above code just goes through the loop once...

    the above code just goes through the loop once and does not ask for any more input.
    now if i replace %c with %d and make that variable an int and do c==1 then the program works as desired.
  7. Replies
    10
    Views
    4,782

    C comma operator problem

    hey I've just been using the comma operator and it is not producing the expected results



    char c;

    while(scanf("%c",&c),c=='y')
    {
    printf("Yes");
    }
  8. Replies
    8
    Views
    1,548

    thanks

    thanks for the replies. It's been real useful to know that float numbers are approximations and may give absurd results.

    I had just been going through complex XORing to swap 2 variables without...
  9. Replies
    8
    Views
    1,548

    Floating point problem

    hey i am a complete newbie to c.


    I am having this problem with floating points and the output is producing really wired results
    I'm using gcc to compile it



    float i=0.0;...
Results 1 to 9 of 9