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> | |
int main() { | |
std::cout << "hello world"; | |
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> | |
int main() | |
{int x,y,suma,resta,product,division,residuo; | |
std::cout<<"\n ingrese numero x:"; | |
std::cin>>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> | |
using namespace std; | |
int main() | |
{ int Celsius,Fahrenheit; | |
cout << "Enter Fahrenheit temperature: "; | |
cin >> Fahrenheit; | |
Celsius = (Fahrenheit-32)*5/9; | |
cout << "Celsius = " << Celsius << endl; |
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 <ctime> | |
#include <cstdlib> | |
using namespace std; | |
int main () | |
{ | |
int Random, Num ,Guess; | |
Guess = 0; | |
srand(time(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 () | |
{ int sum,min,max,n; | |
sum=0; | |
cout << "We´re going to sum up numbers between numbers!!" << endl; | |
cout << "Now pick the first integer that you want to initialized: " << endl; | |
cin >> min; | |
n=min; |
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> | |
using namespace std; | |
int sum (int x,int y) | |
{ | |
int sum; | |
sum=x+y; | |
return sum; | |
} |
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 <algorithm> | |
using namespace std; | |
int main () | |
{ | |
int X, Y; | |
double long A; | |
string another; |
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 std::cout; | |
using std::cin; | |
using std::endl; | |
// input is a non-negative value | |
// output is the factorial of n. | |
// remember that 0! is 1 | |
// fix the wrong answer of always 42 | |
unsigned long long factorial(unsigned long long n){ | |
if (n==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> | |
#include <cmath> | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
float total(float array[],int size){ | |
float sum = 0.0; | |
for (int i=0;i<size;i++){ | |
sum=sum+array[i]; | |
} |
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 std::cout; | |
using std::cin; | |
using std::endl; | |
// returns the minimum value (smallest) of a b c d | |
float minimum_of_4(float a, float b, float c, float d){ | |
if(a<b && a<c && a<d) {return a;} | |
if(b<a && b<c && b<d) {return b;} | |
if(c<b && c<a && c<d) {return c;} |
OlderNewer