Last active
August 29, 2015 13:56
Revisions
-
dillmo revised this gist
Feb 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ /* Copyright(c) 2014 dillmo * Licensed under the MIT License (http://opensource.org/licenses/MIT) * * A program I made for algebra class. Running this program outputs several * functions with their respective parent functions. To take advantage of this * program for studying, it is recommended you run it, then graph the output * for whichever type of function you are studying. -
dillmo revised this gist
Feb 7, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ /* Copyright(c) 2014 dillmo * Licensed under the MIT License (http://opensource.org/licenses/MIT) * * A program I made for algebra class. Running this program outputs several -
dillmo revised this gist
Feb 7, 2014 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,12 @@ /* Copyright(c) dillmo 2014 * Licensed under the MIT License (http://opensource.org/licenses/MIT) * * A program I made for algebra class. Running this program outputs several * functions with their respective parent functions. To take advantage of this * program for studying, it is recommended you run it, then graph the output * for whichever type of function you are studying. */ #include <iostream> #include <cstdlib> #include <ctime> -
dillmo revised this gist
Feb 7, 2014 . 1 changed file with 0 additions and 116 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,116 +0,0 @@ -
dillmo revised this gist
Feb 7, 2014 . 1 changed file with 124 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,124 @@ #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int a, h, k, b, c, d; srand (time(NULL)); // Constant function cout << "Parent function: y = a" << '\n'; for(int i = 1; i <= 2; i++) { a = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << '\n'; } // Linear function cout << '\n' << "Parent function: y = x" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); cout << "Trans " << i << ": y = " << a << "x" << '\n'; } // Absolute value function cout << '\n' << "Parent function: y = |x|" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "|x + (" << -h << ")| + (" << k << ")" << '\n'; } // Quadratic function cout << '\n' << "Parent function: y = x^2" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "(x + (" << -h << "))^2 + (" << k << ")" << '\n'; } // Square root function cout << '\n' << "Parent function: y = sqrt(x)" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << " * sqrt(x + (" << h << ")) + (" << k << ")" << '\n'; } // Cubic function cout << '\n' << "Parent function: y = x^3" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); b = rand() % 20 - 10; c = rand() % 20 - 10; d = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "x^3 + (" << b << ")x^2 + (" << c << ")x + (" << d << ")" << '\n'; } // Cube root function cout << '\n' << "Parent function: y = x^(1/3)" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "(x + (" << -h << "))^(1/3) + (" << k << ")" << '\n'; } // Exponential function cout << '\n' << "Parent function: y = a^x" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while((a == 0) || (a == 1)); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "^(x + (" << -h << ")) + (" << k << ")" << '\n'; } return 0; } -
dillmo revised this gist
Feb 7, 2014 . 1 changed file with 13 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -37,7 +37,8 @@ int main() { h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "|x + (" << -h << ")| + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = x^2" << '\n'; @@ -50,7 +51,8 @@ int main() { h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "(x + (" << -h << "))^2 + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = sqrt(x)" << '\n'; @@ -63,7 +65,8 @@ int main() { h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << " * sqrt(x + (" << h << ")) + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = x^3" << '\n'; @@ -77,7 +80,8 @@ int main() { c = rand() % 20 - 10; d = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "x^3 + (" << b << ")x^2 + (" << c << ")x + (" << d << ")" << '\n'; } cout << '\n' << "Parent function: y = x^(1/3)" << '\n'; @@ -90,7 +94,8 @@ int main() { h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "(x + (" << -h << "))^(1/3) + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = x^x" << '\n'; @@ -103,8 +108,9 @@ int main() { h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "^(x + (" << -h << ")) + (" << k << ")" << '\n'; } return 0; } -
dillmo revised this gist
Feb 6, 2014 . 1 changed file with 20 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,26 @@ int main() { srand (time(NULL)); cout << "Parent function: y = a" << '\n'; for(int i = 1; i <= 2; i++) { a = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << '\n'; } cout << '\n' << "Parent function: y = x" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); cout << "Trans " << i << ": y = " << a << "x" << '\n'; } cout << '\n' << "Parent function: y = |x|" << '\n'; for(int i = 1; i <= 2; i++) { do -
dillmo revised this gist
Feb 6, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -80,7 +80,7 @@ int main() { do { a = rand() % 20 - 10; } while((a == 0) || (a == 1)); h = rand() % 20 - 10; k = rand() % 20 - 10; -
dillmo created this gist
Feb 6, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,91 @@ #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int a, h, k, b, c, d; srand (time(NULL)); cout << "Parent function: y = |x|" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "|x + (" << -h << ")| + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = x^2" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "(x + (" << -h << "))^2 + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = sqrt(x)" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << " * sqrt(x + (" << h << ")) + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = x^3" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); b = rand() % 20 - 10; c = rand() % 20 - 10; d = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "x^3 + (" << b << ")x^2 + (" << c << ")x + (" << d << ")" << '\n'; } cout << '\n' << "Parent function: y = x^(1/3)" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "(x + (" << -h << "))^(1/3) + (" << k << ")" << '\n'; } cout << '\n' << "Parent function: y = x^x" << '\n'; for(int i = 1; i <= 2; i++) { do { a = rand() % 20 - 10; } while(a == 0); h = rand() % 20 - 10; k = rand() % 20 - 10; cout << "Trans " << i << ": y = " << a << "^(x + (" << -h << ")) + (" << k << ")" << '\n'; } return 0; }