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 <stdio.h>
#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] = {}; [...]

Subscribe by Email