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> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
struct datos | |
{ | |
int l,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; | |
double sqrt(double); | |
int main() | |
{ | |
int x; | |
cout<< "Give a number"<< endl; | |
cin>> x; | |
double result = sqrt(x); | |
cout<< "Final result is "<< result<< 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 <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 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 std::cin; | |
using std::cout; | |
using std::endl; | |
int main(){ | |
char phrase[100]; | |
int vocala=0; | |
cout<< "Write a phrase" << 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<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 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 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 str1= bigIntegerToString(n); | |
string str2=str1; |
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
//Main | |
package com.example.jesus.synaptech; | |
import android.content.Intent; | |
import android.widget.Button; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.support.design.widget.FloatingActionButton; | |
import android.view.View; |
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
class Solution: | |
def longestPalindrome(self, s: str) -> str: | |
result, resultLen = "",0 | |
for i in range(len(s)): | |
result, resultLen = computePalindrome(i,i, s, result, resultLen) | |
result, resultLen = computePalindrome(i,i+1, s, result, resultLen) | |
return result | |
def computePalindrome(left, right, string, result, resultLen): |