Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <fstream>
using namespace std;
int LineasBananas(string lineas){
int x=0, bananas=0;
for(int i=0; i<lineas.length(); i++){
lineas[i] = tolower(lineas[i]);
@Adals20
Adals20 / Botones.ino
Created April 27, 2017 02:43
Programa de muestra que utiliza 2 botones para configurar las posiciones posibles del cuadrupedo
//Codigo chido Adal
#include <Servo.h>
Servo servo1; // Se crea un objetos de tipo servo para poder controlarlos
Servo servo2;
Servo servo3;
Servo servo4;
Servo servo5;
Servo servo6;
Servo servo7;
// Solving Problems with Programming
// Professor Ken Bauer
//
// Your name here
// Your student# here
// If you worked with somebody else, you need to put their names here
#include <iostream>
#include <string>
using namespace std;
#include <iostream>
#include <cmath>
using namespace std;
double factorial(double x);
double eee(double presicion){
double x = 1, i = 0, y = 1, y1=0;
do{
y1 = y;
#include <iostream>
#include <cmath>
using namespace std;
float Baby(double x){
double error = 0.0001, y;
y = x;
while((y-x/y)>error){
y = (y+x/y)/2;
}
#include <iostream>
using namespace std;
void linea(int n){
int i = 0, f =0;
if (i<=n){
for (i =0; i<= n; i++)
cout << "T";
}
cout <<"\n";
#include <iostream>
#include <cmath>
using namespace std;
float distance(float x1,float y1,float x2,float y2){
float d = sqrt(pow((x2-x1),2)+pow((y2-y1),2));
return d;
}
main(){
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main (){
int palabras=0, lineas=0;
const string nfichero = "texto.txt";
string cadena;
ifstream fichero;
#include <iostream>
using namespace std;
int fibonacci (int n){
int i, primero = 0, segundo =1, resul =0;
for (i=1; i<n; i++){
resul = primero + segundo;
primero = segundo;
segundo = resul;
}
#include <iostream>
using namespace std;
int fibonacci (int n){
if (n==0)
return 0;
else if (n==1 || n== 2)
return 1;
else{
return fibonacci (n-1) + fibonacci (n-2);