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
// 00.basicArraySubprograms.cpp | |
// juanfc 2024-11-04 | |
// | |
#include <iostream> | |
#include <array> | |
using namespace std; | |
// consts | |
const int N=5; |
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
// 00.quickinit.cpp | |
// juanfc 2024-11-30 | |
// https://gist.github.com/juanfal/67cf1a014cc6eeb2bd75b26f3d2eb34b | |
#include <iostream> | |
#include <array> | |
using namespace std; | |
const int N = 3; | |
const int NN = 100; |
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
// hanoi.cpp | |
// juanfc 2024-10-23 | |
// | |
#include <iostream> | |
using namespace std; | |
// prototypes | |
int main() | |
{ |
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
// t04e04.amicable.cpp | |
// juanfc 2024-10-23 | |
// amicable numbers | |
// 284 220 | |
// 1210 1184 | |
// 2924 2620 | |
// 5564 5020 | |
// 6368 6232 | |
// https://gist.github.com/juanfal/e235970d086c69b1d87db0a37c02c895 |
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
// t03e3.nprimes.cpp | |
// juanfc 2024-10-23 | |
// | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
bool isPrime(int n); |
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
// 01.exp.cpp | |
// juanfc 2024-10-23 | |
// expr series with functions. Two ways | |
// https://en.wikipedia.org/wiki/Taylor_series | |
// https://gist.github.com/juanfal/99504b4df2590c909b91a7ead0e96c5c | |
#include <iostream> | |
using namespace std; | |
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
// l04e01.trianglenum.cpp | |
// juanfc 2024-10-23 | |
// | |
// | |
// \Ej Build a procedure that receives from the main() program the height of the next numerical triangle and prints it: | |
// Height? 11 | |
// 1 | |
// 232 | |
// 34543 |
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
// 02.exp.cpp | |
// juanfc 2024-10-22 | |
// calculate the factorial directly by adding n terms | |
// of its series development | |
// Look at https://en.wikipedia.org/wiki/Taylor_series | |
// https://gist.github.com/juanfal/2b9d94a665b6f730a79a84c98e2d62a6 | |
#include <iostream> | |
using namespace std; |
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
// 01.exp.cpp | |
// juanfc 2024-10-22 | |
// calculate the factorial directly by adding n terms | |
// of its series development | |
// Look at https://en.wikipedia.org/wiki/Taylor_series | |
// https://gist.github.com/juanfal/8c7b827df2417ce271d25a4d06468847 | |
#include <iostream> | |
using namespace std; |
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
// 01.exp.cpp | |
// juanfc 2013-10-11 | |
// calcular el factorial directamente sumando N términos de su | |
// desarrollo en serie | |
// ver http://es.wikipedia.org/wiki/Serie_de_Taylor | |
#include <iostream> | |
using namespace std; | |
int main() |