Skip to content

Instantly share code, notes, and snippets.

@juanfal
juanfal / ce08.1.stairofnumbers.cpp
Created October 15, 2025 16:49
rhombus with numbers
// 1.stairofnumbers.cpp
// juanfc 2025-10-15
//
#include <iostream>
using namespace std;
int main()
{
int n = 4;
@juanfal
juanfal / 05.demorgan2.cpp
Created September 30, 2025 11:18
de morgan 2
// 05.demorgan2.cpp
// juanfc 2025-09-30
//
#include <iostream>
using namespace std;
int main()
{
cout << boolalpha;
@juanfal
juanfal / 04.demorgan1.cpp
Last active September 30, 2025 11:17
de Morgan's laws 1
// 04.demorgan1.cpp
// juanfc 2025-09-30
// https://gist.github.com/juanfal/35f5cea92fa0005cbb4fa815f35032eb
#include <iostream>
using namespace std;
int main()
{
int x, y;
@juanfal
juanfal / 03.calculator.cpp
Created September 30, 2025 10:55
calculator
// 03.calculator.cpp
// juanfc 2025-09-30
//
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
@juanfal
juanfal / 30.calculator.cpp
Created September 30, 2025 10:55
calculator
// 03.calculator.cpp
// juanfc 2025-09-30
//
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
@juanfal
juanfal / 02.concatbool.cpp
Last active September 30, 2025 11:19
comparisons concatenation
// 02.concatbool.cpp
// juanfc 2025-09-29
// https://gist.github.com/juanfal/e6333a1de084b92ee95211613a21f525
#include <iostream>
using namespace std;
int main()
{
cout << boolalpha; // to print all bools as true/false
@juanfal
juanfal / 01.booleans.cpp
Created September 30, 2025 10:40
booleans!
// 01.booleans.cpp
// juanfc 2025-09-24
//
#include <iostream>
using namespace std;
int main()
{
cout << "true and true -> " << (true and true) << endl;
@juanfal
juanfal / 31.mercadona.cpp
Last active September 30, 2025 09:19
version with previous to while price reading
// 31.mercadona.cpp
// juanfc 2025-09-29
// version with previous to while price reading
// https://gist.github.com/juanfal/0ad059d9c81aac52b22d836f949ad3bf
#include <iostream>
using namespace std;
int main()
{
@juanfal
juanfal / pdfamaker.sh
Created May 20, 2025 18:37
Converts each argument.pdf file in argument-pdfa.pdf compliant file using Ghostscript
#!/bin/sh
# pdfamaker.sh
# 2025-05-20
#
# build by ChatGPT
# it depends only on Ghostscript
# it works with my current one:
# Ghostscript 10.05.1 (2025-04-29)
# Exit on any error
@juanfal
juanfal / wordPuzzle.cpp
Last active January 29, 2025 13:07
Word Puzzle
// wordPuzzle.cpp
// juanfc 2022-12-07
// juanfc 22/1/02-2012-02-07-2015-02-02
// Program to find words in a word search game
// https://gist.github.com/juanfal/b4f5e72a12b0549e2014b7cebc5b5b81
#include <iostream>
#include <array>
#include <iomanip>
using namespace std;