Created
October 21, 2018 04:02
-
-
Save mano16tali/2c4f6733479ed99392413bd6e7a25f34 to your computer and use it in GitHub Desktop.
Código inspeção de espaçonave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include<stdlib.h> | |
#include <stdbool.h> | |
#include <conio.h> | |
#include <locale.h> | |
#define EIXO_X 2 | |
#define EIXO_Y 2 | |
// Declaração de variáveis | |
int map_area [EIXO_X][EIXO_Y]; | |
int default_area [EIXO_X][EIXO_Y]; | |
int main(){ | |
setlocale(LC_ALL, "Portuguese"); | |
printf("============================================\n"); | |
printf("= CÓDIGO DRONE PHIR =\n"); | |
printf("============================================\n"); | |
printf("\n\nCódigo verificador de anomalias em partes externas da nave espacial. \n"); | |
// Caracteristica padrão da nave, obtendo valores automaticos. | |
for(int x=0;x<EIXO_X;x++){ | |
for(int y=0;y<EIXO_Y;y++){ | |
default_area[EIXO_X][EIXO_Y]=1; | |
} | |
} | |
printf("Captando dados de rastreio da nave\n"); | |
// Captação realizada atraves das coordenadas em relação a nave (GPS). | |
for(int x=0;x<EIXO_X;x++){ | |
for(int y=0;y<EIXO_Y;y++){ | |
printf("EIXO_X / Y %d , %d ", x,y ); | |
// O sensor óptico insere no banco de dados registros de anomalias | |
scanf("%d",&map_area[x][y]); | |
printf("\n"); | |
} | |
} | |
// Comparação de dados com tomada de decisão. | |
for(int x=0;x<EIXO_X;x++){ | |
for(int y=0;y<EIXO_Y;y++){ | |
for(int i=0;i<EIXO_X;i++){ | |
for(int j=0;j<EIXO_Y;j++){ | |
if(default_area[EIXO_X][EIXO_Y]!=map_area[EIXO_X][EIXO_Y]){ | |
printf("DIFERENTE %d, %d \n",default_area[x][y],map_area[x][y]); | |
} | |
} | |
} | |
} | |
} | |
system("pause"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment