hmurcia
|
codepad
|
|
hmurcia
|
Saved pastes by hmurcia:
// PACMAN and GHOST WITH ASCII
#include <iostream>
using namespace std;
struct Person {
|
view (38 lines, 3 lines of output) |
#include <iostream>
#include <cstdlib>
template <class T>
void cambio(T &a, T &b) {
T t = a; a = b; b = t;
|
view (45 lines, 20 lines of output) |
// PACMAN and GHOST WITH ASCII
#include <iostream>
using namespace std;
struct Person {
|
view (29 lines, 12 lines of output) |
// using box, color, gotoxy and msgBox functions
#include <windows.h>
#include <ctime>
#include "mylib.h"
|
view (30 lines, 5 lines of output) |
// Estructura Fraccion. Operaciones simplifica, suma, resta y mostrar
// by hmurcia 2014
#include <iostream>
using namespace std;
|
view (62 lines, 2 lines of output) |
// Manejo de archivos - ios_base::out|ios_base::in
#include <iostream>
#include <fstream>
using namespace std;
|
view (21 lines, 1 line of output) |
// Files and structures sample
#include <iostream>
#include <fstream>
using namespace std;
|
view (39 lines, 6 lines of output) |
// PALINDROME: Determinar la suma de los dígitos de un numero dado y si es o no palindrome
#include<iostream>
#include<cstring>
#include<cmath>
using namespace std;
|
view (51 lines, 9 lines of output) |
// PALINDROME: Es un número dado, palíndrome o no?
#include<iostream>
#include<cstring>
using namespace std;
|
view (43 lines, 2 lines of output) |
/* USO DE WHILE Y DO WHILE
La principal diferencia entre la estructura WHILE y la DO WHILE está en el
momento en que se EVALÚA la CONDICIÓN del CICLO DE REPETICIÓN. Mientras
en el WHILE se evalua al inicio o comienzo del ciclo, en el DO WHILE se evalua
|
view (57 lines, 20 lines of output) |
/* Rotular o etiquetar los elementos del arreglo ventas de 3 filas por 5 columnas de doubles, para indicar el orden en que ellos toman el valor cero de acuerdo al siguiente segmento de programa:
for ( fila = 0; fila <= 2; fila++ )
for ( col = 0; col <= 4; col++ )
ventas[fila][col] = 0;
|
view (26 lines, 3 lines of output) |
// Raro este programa, extraña la manera de manejar el fin de archivo (revisar)
#include <iostream>
#include <fstream>
using namespace std;
int archIguales( ifstream &, ifstream &);
|
view (38 lines, 1 line of output) |
/* Se le pide al usuario el radio r de un círculo y el número de lados NL de un
polígono regular inscrito en dicho círculo.
Calcular y mostrar a través del uso de 3 o más funciones:
|
view (49 lines, 4 lines of output) |
// Manejo de arreglos unidimensionales
#include <iostream>
using namespace std;
int main() {
|
view (17 lines, 4 lines of output) |
#include <iostream>
using namespace std;
void ver(int [], int);
void ver(bool [], int);
|
view (27 lines, 6 lines of output) |
#include <iostream>
using namespace std;
double potencia(double base, int pot);
double potencia(double base, double pot);
|
view (24 lines, 4 lines of output) |
/* Escribir una función recursiva que determine si la suma de los n-1 primeros
términos de valor par, de un vector o arreglo unidimensional de números,
es igual al valor del n-ésimo término.
Escribir la solución iterativa (no recursiva) de la función anterior.
|
view (30 lines) |
// Manteniendo la alineación de columnas
// Listing 4-3 - Exploration 4 Strings (Pag. 28)
// Exploring C++ The Programmer's Introduction to C++ eBook
#include <iostream>
|
view (15 lines, 5 lines of output) |
// Ejercicio : Permutaciones de una cadena de texto
//
#include <iostream>
using namespace std;
|
view (15 lines, 3 lines of output) |
// Ejercicio #1: Hallar el error, corregir y explicar.
//
#include <iostream>
using namespace std;
|
view (15 lines, 3 lines of output) |
/* Arreglo de arreglos (cadenas de texto). Manejo.
En funciones como parámetros */
//
#include <iostream>
using namespace std;
|
view (47 lines, 4 lines of output) |
/* La regla de la falsa posición:
Mecanismo matemático antiguo, equivalente a la solución
de ecuaciones de primer grado moderna
http://www.matematicas.profes.net/archivo2.asp?id_contenido=40696
|
view (30 lines, 7 lines of output) |
// Objetos - constructor de clase - Herencia del constructor
// conflictos
#include <iostream>
using namespace std;
|
view (34 lines, 3 lines of output) |
// Funciones - Maximo entre 4 valores, 3 valores y 2
// Aplicacion de: aleatorios, ciclo do while, continue
//
#include <iostream>
using namespace std;
|
view (53 lines, 4 lines of output) |
// Escritura y lectura de archivos de texto en C++
// http://ideone.com/dBFN8
#include <iostream>
#include <fstream>
using namespace std;
|
view (29 lines, 1 line of output) |
// Global and local variables
#include <iostream>
using namespace std;
double a = 128;
|
view (18 lines, 4 lines of output) |
// cilindro.cpp - (temas: estructuras y clases)
#include <iostream>
using namespace std;
|
view (85 lines, 4 lines of output) |
// Numeros amigos (usando funciones)
#include <iostream>
using namespace std;
bool amigos( int, int );
|
view (36 lines, 6 lines of output) |
// (R) Solución a cuadrática (sin structs, pasando parámetros por valor y referencia)
/* La ejecución del programa debe tener el siguiente aspecto:
Ingresar coeficientes de la ecuación (a, b y c): 1 1 -6
|
view (83 lines, 3 lines of output) |
// (R) Solución a cuadrática (sin structs, pasando parámetros por valor y referencia)
/* La ejecución del programa debe tener el siguiente aspecto:
Ingresar coeficientes de la ecuación (a, b y c): 1 1 -6
|
view (83 lines, 3 lines of output) |
// ALEATORIOS DE NUMEROS REALES COMPRENDIDOS ENTRE 2 LIMITES
//
#include <iostream>
#include <cstdlib>
using namespace std;
|
view (30 lines, 12 lines of output) |
// BARAJA POKER
// TEMATICA: Estructuras, arreglos y funciones
//
// http://www.dynamicdrive.com/forums/archive/index.php/t-35174.html
// http://www.portalhacker.net/index.php/topic,115452.5/wap2.html
|
view (108 lines, 4 lines of output) |
// Contador recursivo de numero de veces que aparece
// un caracter dado dentro de una cadena de texto
//
#include <iostream>
using namespace std;
|
view (47 lines, 7 lines of output) |
// mylib.h libreria para gotoxy clreol clreoscr clrscr
#include <windows.h>
#include <iostream>
#include "mylib.h"
using namespace std;
|
view (99 lines, 5 lines of output) |
// 20110201.3.cpp: Paso de arreglo unidimensional como parametro
#include <iostream>
using namespace std;
const short N = 10; // constante
|
view (32 lines, 5 lines of output) |
// Programa es o no triangulo. Tipo de triangulo. If anidados. PROG1.
#include <iostream>
using namespace std;
int main() {
|
view (37 lines, 1 line of output) |
// Separacion de elementos pares e impares con arreglos, apuntadores
// y funciones
#include <iostream>
using namespace std;
|
view (67 lines, 29 lines of output) |
// Calculator
// source: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4972&lngWId=3
#include <iostream>
using namespace std;
int main()
|
view (59 lines, 5 lines of output) |
// mylib.h (libreria para MYGAME)
#ifndef VC2005
#include <windows.h>
#endif
#define borrapantalla() system("cls");
|
view (13 lines, 1 line of output) |
// LECTURA s_quebrado CON FUNCION Y CON PROCEDIMIENTO
// ESTRUCTURAS, FUNCIONES Y PROCEDIMIENTOS, PASO POR REFERENCIA
#include <iostream>
using namespace std;
|
view (36 lines, 4 lines of output) |