J
JS
I have done the following: New Project -> Console Application -> C Project.
Then I get the following text:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
But where do I write my own C code? I have written the following code:
void c(unsigned int n) {
while (n > 1)
if ((n & 1) == 0)
n = n/2;
else
n = 3 * n + 1;
}
But where should I put it and how do I compile it?
js
Then I get the following text:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
But where do I write my own C code? I have written the following code:
void c(unsigned int n) {
while (n > 1)
if ((n & 1) == 0)
n = n/2;
else
n = 3 * n + 1;
}
But where should I put it and how do I compile it?
js