Etiqueta: C

  • Another C mathematical program

    Disclaimer: For the non geeky programming lovers out there, sorry for spamming you with this bunch of incomprehensible lines of text! The first time I wrote some kind of program was back in high school with a Ti80 calculator which had some sort of BASIC programming language. After reading the manual I spent hours making […]

  • Prime factors code in C and Python

    Today someone spoke about prime factors and I thought it was something interesting to code. I needed to practice my C so I’ve coded it in C. Here it goes: #include #define VMAX 25 int main() { /*Prime numbers < 100 */ int primes[VMAX] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}; int factors[VMAX] = {}; /*Prime factors*/ int repeat[VMAX] = {}; […]