I need the user to insert where he wants to sit, informing the row and column that he wants, if the user chooses the position 0-1 the program will register and write to a txt file later this information, and it will enter a looping to register a new user, where it will enter what position it wants and if it enters a position where it is already occupied by another user < strong> will not accept by placing an X in place to demonstrate that you are busy.
Follow the code ...
#include<stdio.h>
#include <stdlib.h>
void main()
{
printf("\n \nEscolha seu assento: \n\n");
int m, n, fileira, assento;
int lugares[10][16];
for(m=1;m<10;m++){
for(n=1;n<16;n++){
printf("[%d- %d]", m, n);
}
printf("\n");
}
printf("\nFileira desejada: ");
scanf("%d",&fileira);
printf("Assento desejado: ");
scanf("%d",&assento);
system("pause");
}