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 <cstdlib> | |
#include <string> | |
#include <fstream> | |
using namespace std; | |
float Average(float sum, int lines){ | |
float average; | |
average=sum/(lines/2); | |
return average; |
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 <string> | |
#include <cstdlib> | |
#include <algorithm> | |
#include <fstream> | |
using namespace std; | |
void check_banana (string banana){ | |
ifstream AbrirBanana; | |
AbrirBanana.open(banana); |
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 <cstdlib> | |
#include <string> | |
#include <fstream> | |
#include <cmath> | |
#include <vector> | |
using namespace std; | |
float desviacion( vector<int> v, int tam, int suma){ | |
float desviacion; |
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 <vector> | |
using namespace std; | |
int dotProduct(vector<int>v1, vector<int>v2){ | |
int multi=0; | |
for (int n=0; n<v1.size(); n++) | |
{ | |
multi=v1[n]*v2[n]+multi; |
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 <vector> | |
using namespace std; | |
int findThrees(vector<int>list){ | |
int modulo; | |
int suma=0; | |
int num=0; | |
do{ |
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 <string> | |
#include <iostream> | |
using namespace std; | |
#include "BigIntegerLibrary.hh" | |
bool is_palindrome(BigInteger n){ | |
string x = bigIntegerToString (n); | |
reverse(x.begin(),x.end()); | |
BigInteger y = stringToBigInteger(x); |
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
//Jorge Samir Godinez Lara/ A01630155 | |
#include <iostream> | |
using namespace std; | |
bool Palindromo(string cadena, int size){ | |
for(int i = 0; i < size/2; i++) | |
if(cadena[i] != cadena[size-i-1]) | |
return false; | |
return true; | |
} |
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
//Jorge Samir Godinez Lara/ A01630155 | |
#include <iostream> | |
using namespace std; | |
long long Fibonacci(long n){ | |
long a=0, b=1, c=a+b; | |
if(n==0) return 0; | |
if(n==1) return 1; | |
if(n>=3){ | |
for(long i=3;i<=n;i++){ | |
a=b; |
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
//Jorge Samir Godinez Lara/ A01630155 | |
#include <iostream> | |
using namespace std; | |
#include <cmath> | |
long long superpower(long a, long b){ | |
return pow(a,b); | |
} | |
int main(){ | |
long num1=5; |
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
//Jorge Samir Godinez Lara/A01630155 | |
#include<iostream> | |
using namespace std; | |
void triangulo(int n){ | |
for(int i=1;i<=n;i++){ | |
for(int j=1;j<=i;j++) | |
{ | |
cout<<"T"; | |
} |
NewerOlder