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
#ifndef MATRIX_H | |
#define MATRIX_H | |
#include <iostream> //std::string | |
#include <sstream> //std::stringstream | |
#include <initializer_list> //std::initializer_list | |
#include <cmath> //pow | |
/*add me: | |
* - inverse |
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<cstdlib> | |
#include<sstream> //std::stringstream | |
#include<string> //str.length(), npos etc. | |
#include<algorithm> //replace() | |
#include<boost/algorithm/string/replace.hpp> //boost::replace_all() | |
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 <vector>//required of for the primes vector | |
#include <stdexcept>//out_of_range error handeling | |
#include <cmath> | |
/**semi-prime factoring | |
*Author: Dustin Van Tate Testa | |
*Purpose: To find the factors of a semi-prime | |
*Date: spring 2014 | |
*/ |
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> | |
void linearGraph(double m, double x, double b);//graphing function | |
int main(){ | |
//linear: | |
float m, b;//f(x) = mx+b | |
int x_min, x_max;//min_x <= x <= max_x | |
//vars: |
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> | |
void decToFrac(long double dec, long& numerator, long& denominator); | |
void fracSimp(long& numerator, long& denominator); | |
///finds GCF using Euclid's Algorithm (recursive) | |
template <class T>T gcf(T a, T b){ | |
std::cout <<"\nk"; | |
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<boost/algorithm/string/replace.hpp> //boost::replace_all() | |
std::string texttorunes(std::string text); | |
std::string runestotext(std::string text); | |
std::string textinput; |
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> //std::cin, std::cout, toupper() | |
#include <cmath> //pow() | |
//a double is more fit for this as although it will only be holding whole | |
//numbers, They will only have one signifigant figure. | |
double relativeUnitVal(char unit);//returns a value which is relative for each unit which is relative to the values of the other units. | |
int main(){ | |
long givenSize; | |
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> //std::cin, std::cout | |
#include <cstdlib> //don't think this is needed | |
#include <sstream> //std::stringstream | |
#include <string> //std::string, str.length(), std::string::npos, etc. | |
#include <algorithm> //replace() | |
//custom functions (not just useful for this program): | |
int countSubstring(const std::string str, const std::string sub); | |
template <typename T>//copied from internet (to_string() not working) |
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> // std::xcin, std::cout, | |
// Here `unsigned char` is used to store a number and not a letter. | |
// A `char*` (character pointer) is a string, since a string is just an array of `char`s | |
// The character pointer points to the first element and you can increment/decrement it | |
// to see the rest of the elements. | |
char* numberToName(unsigned char monthNum){ | |
/// returns a string which is the name of the month corresponding |
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> //std::cout | |
//example function using pointers (C-compatable) | |
void increaseBy5(int* number); | |
//example function using reference parameters (C++ only) | |
void add5(int& number); | |
int main(){ |