Prime factor finder

#include <iostream> #include <vector> #include <math.h> #include &ltalgorithm> int main(void) { // ull is large data type to input large numbers unsigned long long inputNumb, sieveMax; // for holding found numbers; easy way to sort ascending std::vector&ltunsigned long long&gt foundNumbers; // flag for ending division in prime factorization bool divided; …

Full adder simulation

A full adder simulation implementation in C++. It is implemented with a “adder queue” as part of the assignment prerequisites was adding 8 binary strings to a buffer for adding. #include <iostream> #include <vector> #include <algorithm> //////////////////////////////////////////////////////////////////////////////// // Function Prototypes //////////////////////////////////////////////////////////////////////////////// std::string fullAdder(std::vector<std::vector*> adderIn); int userActivity(std::string stringBuff[9], std::vector<std::vector*> &adderInput); void …

Calculating nth Fibonacci number

This is simply an implementation of Binet’s formula in C++; someone had a question regarding calculating Fibonacci numbers from the nth number, backwards, so I created this small program. It calculates Fibonacci numbers from the 50th, down to the 1st, in reverse. Python would allow for greater Fibonacci sequence calculations …

Logical Argument Truth Table Generator

For a discrete mathematics lab, I was required to submit a program that would generate a truth table given two statements and determine it’s validity; if not valid, it will indicate which columns are incorrect. Part of the prerequisite (for simplicity) was hardcoding in the premise and conclusion; this is …