Skip to content

Instantly share code, notes, and snippets.

#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);
#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
#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);
}
#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);
@Adals20
Adals20 / numeros.cpp
Created January 17, 2017 00:37
Operaciones básicas con 2 números C++
#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;
@Adals20
Adals20 / helloworld.cpp
Created January 17, 2017 00:34
Hello World en C++
#include <iostream>
using namespace std;
int main (){
cout << "Hello World" << endl;
return 0;
}