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...
Type: Posts; User: Oester
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...
I guess you have to use the fscanf function twice. First you read the index number, then the two values.
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.
You have to seed your rand() function.. Put srand(time(NULL)) in your main function.
Try rename your random function..