
-----------------------------------
WordLife619
Mon Apr 04, 2005 7:30 pm

C++ to C (conversion help)
-----------------------------------
Hello everyone. I have been recently doing a bonus program for discrete math class. The program had to generate prime numbers in a simple mathematical, expression, where 'n' was the number being subbed into the expression. However, the program must generate prime numbers for the numbers, 'n', 1 through 200. Recently, my friend helped me out, but he did it in C++. The thing is, he is taking a C++ class, and I'm not. I need help to convert the code below into a C construct, WITHOUT changing the algorithm of the program. This may probably seem lowkey for some of the experience programmers on here, but I have tried using my past knowledge of C, but to no avail. Please help. This is the code in C++, and I need it in C. 


#include 
#include  

int main()
{
 int m;
 const int MAX=200;

 for (int n=1; n