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 main(void) | |
{ | |
int dia, mes, ano; | |
printf("Digite sua data de nascimento no formato dd/mm/aaaa:\n"); | |
if (scanf("%d/%d/%d", &dia, &mes, &ano) != 3) { | |
return 1; | |
} | |
printf("Data informada: %02d/%02d/%04d\n", dia, mes, ano); | |
// FIXME verifique se data informada é consistente!!! |
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
Programa gerador: | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char*argv[]) | |
{ | |
int n = atoi(argv[1]); | |
for (int i = 0; i < (2 + n * 2); ++i) { | |
printf("%d ", n * 3 + i * 2); |
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
#!/bin/bash | |
voice1=pluck | |
notes1="C4,1.3 F4,1 D#4,0.1 C#4,0.1 C4,1.2 F4,0.9 D#4,0.1 C#4,0.1 C4,0.5 | |
F4,0.5 F4,0.5 G#4,0.5 G4,0.135 G#4,0.135 G4,0.135 F4,0.135 Eb4,0.135 | |
F4,0.135 G,4" | |
notes2="G#3,1.3 G#3,1 A#3,0.1 A#3,0.1 G#3,1.2 C#4,0.9 A#3,0.1 A#3,0.1 G#3,0.5 | |
G#3,0.5 C4,0.5 F4,0.5 D#4,0.135 D#4,0.135 Eb4,0.135 Eb4,0.135 Eb4,0.135 | |
Eb4,0.135 Eb,4" |
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 <vector> | |
struct tipo1 {}; | |
int main() | |
{ | |
std::vector<tipo1> vetor; | |
vetor.push_back(tipo1()); | |
vetor.push_back(tipo1()); | |
vetor.push_back(tipo1()); |