This file contains hidden or 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 <iostream.h> | |
#include <conio.h> | |
void main(void) | |
{ | |
// Serie de tipo => -1 1 0 1 1 2 3 5 | |
int a =-1 ,b = 1, c, numTer; | |
cout<<"Ingrese el numero de terminos"; | |
cin>>numTer; | |
for(int i = 0; i < numTer; i++){ | |
c = a + b; |
This file contains hidden or 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 <iostream.h> | |
#include <conio.h> | |
/*Problema | |
Un programa que encuentre el segundo mayor en N numeros ingresados por teclado, | |
los nuemros ingresados deben estar comprendidos entre 10 y 99 | |
*/ | |
void main(void) | |
{ | |
int minNum=10,maxNum=99,numTer,num, mayNum=0, mayTwoNum=0; | |
cout<<"Ingrese el numero de terminos"; |
This file contains hidden or 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 <iostream.h> | |
#include <conio.h> | |
void main(void) | |
/*Problema: el gerente de un concesionario de una marca de automoviles desea conocer las estadisticas de autos vendidos por cada modelo que dispone. si se sabe que tiene 05 modelos y que inicio su trabajo en el año X ingresado por teclado. se desea desarrollar un programa que, dado las cantidades vendidas por cada año hasta el presente año, calcule el año que vendio mas autos, el año que vendio menos y el promedio de autos vendidos por cada modelo hasta el año actual | |
*/ | |
{ | |
// | |
int anioIni,anio_actual=2017; | |
int cantAutVen, sumNumAut=0, may=0, anioMay, men=0, anioMen; | |
float prom; |
This file contains hidden or 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 "iostream.h" | |
#include "conio.h" | |
/* | |
Un programa que elimine los numeros primos que se repiten en un vector de N elementos | |
*/ | |
void main(void) | |
{ | |
// Variables para los primos | |
int numPri = 1 ,cantDiv=0; | |
// Vector |
This file contains hidden or 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
# Image from node | |
FROM node:7 | |
# Global install yarn package manager | |
RUN apt-get update && apt-get install -y curl apt-transport-https && \ | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ | |
apt-get update && apt-get install -y yarn | |
# Install Nginx |
This file contains hidden or 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
{ | |
"workbench.iconTheme": "vscode-great-icons", | |
"workbench.colorTheme": "Mirage", | |
"editor.fontFamily": "Fira Code, Roboto Mono, monospace", | |
"editor.lineHeight": 30, | |
"terminal.integrated.shell.windows": "C:\\WINDOWS\\sysnative\\cmd.exe", | |
"terminal.integrated.shellArgs.windows": [ | |
"/K", | |
"%CMDER_ROOT%/vendor/init.bat" | |
], |
This file contains hidden or 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
const getIn = (obj, path, defaultValue) => { | |
var _path = path.split('.'); | |
var _obj = Object.assign({}, obj); | |
var head; | |
while(typeof _obj == 'object' && _path.length > 0) { | |
[head, ..._path] = _path; | |
_obj = _obj[head]; | |
} | |
return _obj || defaultValue; |
This file contains hidden or 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
{ | |
"quotes": [ | |
{ | |
"text": "Levántate y camina hacia adelante, tienes las piernas para hacerlo. ", | |
"author": "Edward Elric", | |
"anime": "FMA" | |
}, | |
{ | |
"text": "No vivas con falsedades ni miedos, porque terminarás odiándote a ti mismo.", | |
"author": "Uzumaki Naruto", |
This file contains hidden or 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
function mergeSort(array) { | |
if (array.length > 2) { | |
let half = parseInt(array.length/2); | |
let [left, rigth] = [mergeSort(array.slice(0, half)), mergeSort(array.slice(half))]; | |
let ret = []; | |
for (let i = 0; i < array.length;i++) { | |
if (left.length <= 0 || (rigth.length > 0 && left[0] > rigth[0])) | |
ret.push(rigth.shift()); | |
else | |
ret.push(left.shift()); |
This file contains hidden or 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 main() { | |
var deck = new Deck(); | |
deck.removeCard('Diamons', 'Ace'); | |
print(deck); | |
} | |
class Deck { | |
List<Card> cards = []; |
OlderNewer