Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <cmath>
using namespace std;
double Sum(double list[], int size){
double total = 0;
for (int i = 0; i < size; i++){
total += list [i];
}
return total;
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main () {
int lines = 0;
int charac = 0;
ifstream myfile ("Test1.txt");
#include <iostream>
#include <math.h>
#include <stdlib.h>
using namespace std;
double Sqrt( int x ){
float SQResult = sqrt( x);
return SQResult;
}
double BMethod( int x ){
@CesarR99
CesarR99 / Yo soy 196
Created November 24, 2017 20:22
WSQ 8
#include <string>
#include <iostream>
using namespace std;
#include "BigIntegerLibrary.hh"
bool is_palindrome(BigInteger x){
string snumbers;
string vnumbers;
snumeros=bigIntegerToString(x);
vnumeros=string (snumbers.rbegin(), snumbers.rend());
@CesarR99
CesarR99 / Gato
Created November 24, 2017 20:09
Final Project
#include <iostream>
#include <string.h>
#include <sstream>
#include <ctype.h>
using namespace std;
class game{
private:
int place,gameOn,turn,winner;
@CesarR99
CesarR99 / Contant 'e'.
Created November 24, 2017 19:49
WSQ 12
#include <iostream>
#include <cmath>
using namespace std;
#define _USE_MATH_DEFINES
double Evalue( int n, float e){
for (int i = 1; i <= n; i++)
{
e = e + 1.0/tgamma(i+1);
}
@CesarR99
CesarR99 / Bananas
Created November 24, 2017 19:26
WSQ 11
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int find_bananas(string lines){
int x=0;
int bananas = 0;
for(int i = 0; i<lines.length(); i++){