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> | |
#include <stdlib.h> | |
#include <ctime> | |
#include <stdio.h> | |
#include <cmath> | |
#include <string> | |
using std::cout; | |
using std::endl; | |
using std::cin; | |
using std::string; |
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 <string> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
#include "BigIntegerLibrary.hh" | |
bool is_palindrome(BigInteger n){ | |
string a1= bigIntegerToString(n); | |
string a2=a1; | |
reverse(a2.begin(), a2.end()); | |
return (a2==a1); |
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> | |
#include<math.h> | |
using namespace std; | |
double factorial (int x) | |
{ | |
double factorial=1; | |
for(int i=1.; i<x; i++) | |
{ | |
factorial=factorial*i; |
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> | |
#include <math.h> | |
using namespace std; | |
float distancia(float x1,float x2,float y1,float y2) | |
{ | |
return sqrt(pow((x2-x1),2)+pow((y2-y1),2)); | |
} | |
int main() | |
{ | |
float x1=0,x2=0,y1=0,y2=0; |
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> | |
#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 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> | |
using namespace std; | |
double sqrt(double); | |
int main() | |
{ | |
int pizza; | |
cout<< "Give a number"<< endl; | |
cin>> pizza; | |
double result = sqrt(pizza); | |
cout<< "Final result is "<< result<< endl; |
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> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
struct datos | |
{ | |
int l,c; | |
}; |
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> | |
#include <string> | |
using namespace std; | |
int countChars(string userInput, char theChar){ | |
int countChars = 0; | |
for (int i = 0; i < userInput.size(); i++) | |
{ |
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> | |
#include <cmath> | |
double R,A; | |
using namespace std; | |
double promedio(double a,double b,double c, double d,double e, double f,double g,double h,double i, double j){ | |
R=(a+b+c+d+e+f+g+h+i+j)/10; | |
return R; | |
} | |
double suma(double a,double b,double c, double d,double e, double f,double g,double h,double i, double j){ | |
R=(a+b+c+d+e+f+g+h+i+j); |
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> | |
#include <string> | |
#include <algorithm> | |
using namespace std; | |
int main () | |
{ | |
int X, Y; | |
double long A; | |
string another; |
NewerOlder