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; | |
int main() | |
{ | |
double array[10]; | |
double a; | |
for(int i=0;i<10;i++) | |
{ | |
cout<<"dame el numero,que va ir en la posición "<< i+1<<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 <cmath> | |
using namespace std; | |
int main() | |
{ | |
double array[10]; | |
double a; | |
for(int i=0;i<10;i++) | |
{ | |
cout<<"dame el numero,que va ir en la posición "<< i+1<<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> | |
using namespace std; | |
bool esPalindromo(string cadena, int size){ | |
for(int i = 0; i < size/2; i++) | |
if(cadena[i] != cadena[size-i-1]) | |
return false; | |
return true; | |
} |
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; | |
long long Fib(long x){ | |
long a=0, b=1, c=a+b; | |
if(x==0) return 0; | |
if(x==1) return 1; | |
if(x>=3){ | |
for(long i=3;i<=x;i++){ | |
a=b; |
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; | |
long pot(long x,long y){ | |
int z; | |
z=pow((x),y); | |
return z; | |
} | |
int main(){ | |
long a,b,c; |
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; | |
void tri(int x){ | |
for(int i=1;i<=x;i++){ | |
for(int t=1;t<=i;t++) | |
{ | |
cout<<"T"; | |
} | |
cout<<endl; | |
} |