Skip to content

Instantly share code, notes, and snippets.

View cars.cpp
#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;
View q11p2.cpp
#include <iostream>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <fstream>
using namespace std;
void check_banana (string banana){
ifstream AbrirBanana;
AbrirBanana.open(banana);
View q11p1.cp
#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;
View Quiz10q2.cpp
#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;
View Quiz10q1.cpp
#include <iostream>
#include <vector>
using namespace std;
int findThrees(vector<int>list){
int modulo;
int suma=0;
int num=0;
do{
View Palindromo
#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);
View q4.cpp
//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;
}
View q3.cpp
//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;
View q2.cpp
//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;
View q1.cpp
//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";
}
You can’t perform that action at this time.