I am writing a program in C language which is an India Game called Thambola(similar to Bingo). In this game the user gets a 3x9 ticket and the computer asks the user to enter the number which the second program(this picks numbers randomly from 1-90) picked. If the entered number exists in the ticket, the number should be changed to 'x' meaning the number has been stricken off. I need help here. How to replace an already printed number with 'x'? i read this C - Remove and replace printed items but it doest help because i have 27 numbers to be changed.Please help me. Here is the part of the code:
int number,i,j;
const char x='x';
printf("\nEnter the number:");
scanf("%d",&number); // number entered by the user from the Picker
for (i=0;i<3;i++)
for (j=0;j<9;j++)
{if (ticket[i][j]==number)
ticket[i][j]=x;
printf("%d",ticket[i][j]); //if the input number is present in the ticket, this should change it to 'x
}
getchar();
}