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 main (){ | |
cout << "Hello World" << endl; | |
return 0; | |
} |
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 main (){ | |
cout << "Escriba el primer numero" << endl; | |
int x1; | |
cin >> x1; | |
cout << "Esbriba el segundo numero" << endl; | |
int x2; | |
cin >> x2; |
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 main(){ | |
int f1, c1; | |
cout << "---Conversor de Grados Celcuis a Fahrenheit---" << endl; | |
cout << "" << endl; | |
cout << "Cual es la temperatura en Fahrenheit: "; | |
cin >> f1; | |
c1 = (5*(f1-32)/9); |
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 square_root(double x){ | |
return pow(x, 1.0/2); | |
} | |
double square_cube(double x){ | |
return cbrt(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
#include <iostream> | |
#include <stdlib.h> //liberia que nos ayudara a crear los numeros aleatoreos | |
using namespace std; | |
int main() | |
{ | |
int x1, x2, v=0, c=0; | |
srand(time(NULL)); | |
x1 = rand()%100+1; | |
//cout << x1 << endl; // Linea para saber cual es el numero secreto y asi poder probar el programa |
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 minimunThree(int x, int y, int z){ | |
if (y>=x && z>=x) | |
return (x); | |
else if(y<=x && y<=z) | |
return (y); | |
else if (z<=x && z<=y) | |
return (z); |
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 main(){ | |
int limite1, limite2, i, suma = 0; | |
cout << "Introdusca el numero menor de la serie: "; | |
cin >> limite1; | |
i = limite1; | |
cout << "Introdusca el numero mayor de la serie: "; | |
cin >> limite2; |
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 suma (int x1, int x2){ | |
int z; | |
return z = x1 + x2; | |
} | |
int resta (int x1, int x2){ | |
int z; | |
return z = x1 - x2; |
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 factorial(int x){ | |
if (x == 0) | |
return 1; | |
else { | |
int recurso = factorial(x-1); | |
int res = x * recurso; | |
return res; |
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 <stdio.h> | |
using namespace std; | |
main() | |
{ /* PROGRAM TO PRINT OUT SPACE RESERVED FOR VARIABLES */ | |
char c; | |
short s; | |
int i; | |
unsigned int ui; |
OlderNewer