Skip to content

Instantly share code, notes, and snippets.

View felladrin's full-sized avatar

Victor Nogueira felladrin

View GitHub Profile
@felladrin
felladrin / calculanota.html
Created October 11, 2010 19:39
Primeira versão da Calculadora de Notas
<script>
/*--------------------------------------------------------------------------+
Calculadora de Notas para estudantes da UFRN
Copyright (C) 2010 Victor Nogueira
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@felladrin
felladrin / calculanota.js
Created July 10, 2011 18:29
Segunda versão da Calculadora de Notas
// Calculadora de Notas - Versão 2.1.2 (27 de julho de 2011)
// Copyright (C) 2011 Victor Nogueira
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@felladrin
felladrin / layoutpadrao.css
Created February 10, 2012 20:36
Layout Padrão
#area_conteudo
{
margin: auto;
width: 922px;
}
#area_superior
{
width: 902px;
color: #666;
@felladrin
felladrin / gist:1792698
Created February 10, 2012 20:41
Código html para uma página de redirecionamento
<!DOCTYPE html>
<html>
<head>
<title>Mudamos de endereço!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="5;url=http://google.com.br">
<style type="text/css">
a
{
color:#2098DF;
@felladrin
felladrin / gist:1792876
Created February 10, 2012 21:05
Invertendo os dígitos de um número inteiro
#include <iostream>
using namespace std;
int main()
{
unsigned int num;
unsigned int numinv;
cout << "Digite um número inteiro não-negativo: ";
cin >> num;
@felladrin
felladrin / gist:1792883
Created February 10, 2012 21:07
Forma binária de um número inteiro
#include <iostream>
using namespace std;
void binario(int n)
{
int resto;
if(n <= 1)
{
cout << n;
@felladrin
felladrin / gist:1792891
Created February 10, 2012 21:09
Quadrado dos N primeiros números não-negativos
#include <iostream>
using namespace std;
int main()
{
int n;
do
{
cout << "Digite um número inteiro positivo: ";
@felladrin
felladrin / gist:1792915
Created February 10, 2012 21:12
Multiplicação de matrizes usando a classe Vector
#include <iostream>
#include <iomanip>
#include <vector>
using namespace std;
void altera(vector< vector<int> > & v, int i, int j, int x);
int main()
{
vector< vector<int> > a(2, vector<int>(3));
@felladrin
felladrin / gist:1792947
Created February 10, 2012 21:16
Contagem de letras e inversão de palavras de um texto
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
unsigned int contaLetra(const string &txt, const char &letra)
@felladrin
felladrin / gist:1792957
Created February 10, 2012 21:18
Herança simples
#include <iostream>
using namespace std;
class Animal
{
public:
Animal() {}
void respirar()