This file contains hidden or 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; | |
double Sum(double list[], int size){ | |
double total = 0; | |
for (int i = 0; i < size; i++){ | |
total += list [i]; | |
} | |
return total; |
This file contains hidden or 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; | |
int main () { | |
int lines = 0; | |
int charac = 0; | |
ifstream myfile ("Test1.txt"); |
This file contains hidden or 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> | |
#include <stdlib.h> | |
using namespace std; | |
double Sqrt( int x ){ | |
float SQResult = sqrt( x); | |
return SQResult; | |
} | |
double BMethod( int x ){ |
This file contains hidden or 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> | |
using namespace std; | |
#include "BigIntegerLibrary.hh" | |
bool is_palindrome(BigInteger x){ | |
string snumbers; | |
string vnumbers; | |
snumeros=bigIntegerToString(x); | |
vnumeros=string (snumbers.rbegin(), snumbers.rend()); |
This file contains hidden or 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.h> | |
#include <sstream> | |
#include <ctype.h> | |
using namespace std; | |
class game{ | |
private: | |
int place,gameOn,turn,winner; |
This file contains hidden or 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; | |
#define _USE_MATH_DEFINES | |
double Evalue( int n, float e){ | |
for (int i = 1; i <= n; i++) | |
{ | |
e = e + 1.0/tgamma(i+1); | |
} |
This file contains hidden or 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; | |
int find_bananas(string lines){ | |
int x=0; | |
int bananas = 0; | |
for(int i = 0; i<lines.length(); i++){ |