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
#compressao | |
def compressao(): | |
arq = open("arquivo.txt", 'r+') #lendo e depois alterando | |
posicao = 0 | |
fim = 0 | |
encontrou = 0 | |
arq.seek(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
#primeiro, preenche campo por campo e verifica-se o tamanho | |
#concatena tudo numa unica string e manda pro arquivo (registro) | |
#bloco sera uma lista de registros | |
registro = "" | |
"" | |
def criaArquivo(): | |
global registro | |
#leitura e verificacao de campos |
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> | |
using namespace std; | |
/** | |
USANDO HERANÇA E A CLASSE VETOR2D COMO BASE, CRIE UMA NOVA CLASSE CHAMADA VETOR3D QUE ALÉM DAS COORDENADAS X E Y, | |
TAMBÉM TERÁ A COORDENADA Z. IMPLEMENTE O QUE FOR NECESSÁRIO PARA QUE A SAÍDA ABAIXO SEJA GERADA. | |
CASO SEJA NECESSÁRIO INCLUIR NOVOS MÉTODOS NA CLASSE VETOR2D, DEMONSTRE CLARAMENTE. | |
**/ | |
class Vetor2d { |
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> | |
#include <ctype.h> | |
#define NCARTAS 5 | |
#define NDICAS 3 | |
typedef struct Carta { | |
char* dicas[NDICAS]; | |
char* personagem; |
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> | |
int main () | |
{ | |
double nota[5]; | |
int rep=0,rec=0,B=0,A=0,i=0; | |
do | |
{ | |
//printf ("i inicial %d\n",i); | |
printf("Digite uma nota entre 0 e 10: "); |
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> | |
int main () { | |
int nota[5], rep = 0, rec = 0, a = 0, b = 0, i; | |
for (i = 0; i < 5; i++) { | |
printf ("Digite a nota: "); | |
scanf ("%d", ¬a[i]); | |
} |