Skip to content

Instantly share code, notes, and snippets.

View NicolasFrancaX's full-sized avatar
🎯
Focusing

Nicolas França NicolasFrancaX

🎯
Focusing
View GitHub Profile
#include <stdio.h>
int main() {
int i;
for(i = 1005; i < 3500; i += 15) {
printf("%d\n", i);
}
return 0;
#include <stdio.h>
int main() {
int i = 5;
// Usando i++
printf("%d\n", i++); // => Primeiro incremento
printf("%d\n", i++); // => Segundo incremento
printf("%d\n", i);
printf("%d\n", i);
/*
* Problem: https://www.urionlinejudge.com.br/judge/en/problems/view/1010
*
*/
#include <stdio.h>
int main() {
int code_one, code_two, units_one, units_two;
float price_one, price_two, total;
/*
* Problem: https://www.urionlinejudge.com.br/judge/en/problems/view/1009
*
*/
#include <stdio.h>
int main() {
char *name;
float salary, sale_total, total;
interactor :off
notification :off
guard :shell do
watch(%r{^test/(.+)_test\.rb$}) { task }
watch(%r{^lib/(.+)\.rb$}) { task }
watch('Guardfile') { task }
end
def task
998765432
22345678
9.9876.5432
2234.5678
22.34.5678
99876-5432
2234-5678
998-765-432
998.765.432
2234 5678
@NicolasFrancaX
NicolasFrancaX / exercicio_logica_de_programacao.html
Last active August 29, 2015 13:57
Você deve sortear 6 números de 1 a 60 e guardar numa array. Depois peça para o usuário dizer 6 números, um de cada vez (pode usar um prompt ou um input ) e guarde-os em uma outra array. Aí diga quantos números ele acertou. Sim, é a loteria certinha desta vez!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Loteria</title>
</head>
<body>
<script type="text/javascript">
var numerosJogador = []
, numerosAleatorios = []
function calculaDiasDeVida(idade) {
return idade * 365;
}
function calculaBatimentos(dias) {
return dias * 24 * 60 * 80;
}
var idade = 17;