Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char *argv[])
- {
- char a, vmapa[10][20];
- int linhas, colunas;
- FILE *mapa = fopen("mapa.txt", "rt");
- for (linhas = 0; linhas < 10 ; linhas++)
- {
- for (colunas = 0; colunas<21; colunas++)
- {
- vmapa[linhas][colunas]=fgetc(mapa);
- }
- }
- vmapa[5][5] = 'X';
- for (linhas = 0; linhas < 10 ; linhas++)
- {
- for (colunas = 0; colunas<21; colunas++)
- {
- printf("%c", vmapa[linhas][colunas]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment