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
public class Aluno { | |
String nome; | |
int matricula; | |
public Aluno(String nome, int matricula) { | |
this.nome = nome; | |
this.matricula = matricula; | |
} | |
public String getNome() { |
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
// -- LISTA PASSAGEIRO | |
typedef struct Passageiro { | |
char *nome; | |
long long int cpf; | |
char *endereco; | |
long long int telefone; | |
pListaPassagem passagens; | |
} Passageiro, *pPassageiro; | |
typedef struct CelulaPassageiro { |
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
void inserirPassageiro(pListaPassageiro lista, pPassageiro item) { | |
//printf("TEST - func call\n"); | |
pCelulaPassageiro q = lista->primeiro->proximo; | |
//printf("TEST - alloc q\n"); | |
pCelulaPassageiro anterior = lista->primeiro; | |
//printf("TEST - alloc anterior\n"); | |
pCelulaPassageiro novaCelula = criaCelulaPassageiro(item); | |
//printf("TEST - alloc nova celula\n"); | |
if (!listaVaziaPassageiro(*lista)) { | |
//printf("TEST - lista cheia\n"); |
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
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct { | |
char curso[30]; | |
int codigo; | |
char turno[5]; | |
} Curso; |
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
int mdcEx23(int num1, int num2){ | |
int* temp = malloc(sizeof(int)); | |
while(num2 != 0){ | |
temp = num1 % num2; | |
num1 = num2; | |
num2 = temp; | |
} | |
return num1; | |
free(temp); | |
} |
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
float factRecursiva(int num){ | |
if(num == 0){ | |
return 1; | |
} | |
else { | |
return num * factRecursiva(num - 1); | |
} | |
} |
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
int subRotinaEx30(int* vetor, int qtd, bool ordem){ | |
// Ordem é a maneira que será imprimida. | |
// true = vetor[0], vetor[1], ..., vetor[n-1] | |
// false = vetor[n-1], ..., vetor[1], vetor[0] | |
int sum = 0; | |
if(qtd < 0){ | |
return 0; | |
} | |
if(ordem == true){ | |
subRotinaEx30(vetor, qtd - 1, ordem); |
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
using System; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//int operação, resultado = 0, num1, num2, raio, altura; ISSO É COISA DE PREGUIÇOSO | |
//Na hora da prova tudo bem, por causa de espaço, mas para programar coloque um em baixo do outro. |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Aula_23_02 | |
{ | |
class employee | |
{ |
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 "../header/player.h" | |
#include <math.h> | |
void Player::init(const char* path, | |
int srcX, int srcY, | |
int w, int h, | |
float initX, float initY) { | |
BaseSprite::init(path, srcX, srcY, w, h, initX, initY); | |
} |
NewerOlder