Search:

Type: Posts; User: Oester

Search: Search took 0.00 seconds.

  1. Replies
    9
    Views
    3,647

    i = scanf( "%c%c", &m, &km) ; Here scanf...

    i = scanf( "%c%c", &m, &km) ;


    Here scanf will read two characters from the standard input (keyboard) and put one character in m and one in km. And as posted above, this declaration of i isn't...
  2. I guess you have to use the fscanf function...

    I guess you have to use the fscanf function twice. First you read the index number, then the two values.
  3. Replies
    16
    Views
    1,927

    If I understand this right you want to get a...

    If I understand this right you want to get a digit between 0-8.. You can do this easy by using the modulo operation.. Just do rando = rand() % 9; This will always get u a digit below 9.
  4. Replies
    16
    Views
    1,927

    You have to seed your rand() function.. Put...

    You have to seed your rand() function.. Put srand(time(NULL)) in your main function.
  5. Replies
    16
    Views
    1,927

    Try rename your random function..

    Try rename your random function..
Results 1 to 5 of 5