Mmmm, faster you say - how about turning on the optimiser?
$ gcc baz.c -lm
$ time ./a.out
1000000
720720
25
real 0m35.909s
Type: Posts; User: Salem
Mmmm, faster you say - how about turning on the optimiser?
$ gcc baz.c -lm
$ time ./a.out
1000000
720720
25
real 0m35.909s
Step 1 is learn how to indent code. It helps everyone (including you) to figure out what is going on.
#include <stdio.h>
#include <math.h>
int main()
{
int n, i, br, max, p, k;