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 <iostream> //declaracao de biblioteca padrão do código, necessário para o funcionamento | |
#include <string> | |
using namespace std; //declaração padrão também | |
int main () | |
{ | |
int n=3,i,j,ContadorX=0,ContadorO=0,Erro=0,ContaX=0,ContaO=0,ContaP=0; | |
char jogo[n][n]; | |
cout << "Insira o jogo atual: (horizontalmente) " << endl; //Recebemos UM CARACTER POR VEZ AQUI, de forma horizontal |
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 <iostream> //declaracao de biblioteca padrão do código, necessário para o funcionamento | |
using namespace std; //declaração padrão também | |
int main () | |
{ | |
int a1,a2,distancia=0,i=1,metade=0,cansaco=0,menor=0,maior=0,contador1=0,contador2=0; //declaração das variavéis, todas do tipo INTEIRO | |
cout << "Insira as coordenadas do primeiro amigo: " <<endl; //Entrada para receber as variaveis a1 e a2 | |
cin >> a1; // 1 | |
cout << "Insira as coordenadas do segundo amigo: " <<endl; |
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> | |
#define TAM 2 | |
typedef struct | |
{ | |
char nome[20]; | |
char tipo[15]; | |
int integrantes,posicao; |
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 <string.h> | |
int main(){ | |
int n, j=0,i,tam; | |
char num[50],resp[50]; | |
gets(num); | |
tam=(int)strlen(num); |