This file contains 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> | |
#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]); |
This file contains 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
//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; |
This file contains 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
// 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; |
This file contains 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> | |
#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; |
This file contains 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> | |
#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; | |
} |
This file contains 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> | |
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"; |
This file contains 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> | |
#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(){ |
This file contains 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> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
int main (){ | |
int palabras=0, lineas=0; | |
const string nfichero = "texto.txt"; | |
string cadena; | |
ifstream fichero; |
This file contains 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> | |
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; | |
} |
This file contains 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> | |
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); |
NewerOlder