Search found 1 match
- Thu Sep 14, 2006 5:03 pm
- Forum: Volume 4 (400-499)
- Topic: 406 - Prime Cuts
- Replies: 187
- Views: 60490
406 WA... why.. ??
#include <stdlib.h>
#include <stdio.h>
#include "math.h"
int main()
{
int* p;
p = new int[2001];
int bigarray[400];
int c;
int k, j;
p[1] = 0;
c = (int) sqrt(2000.0) + 1;
for(k = 4; k < 2000; k += 2)
p[i] = 1;
p[2] = 0; /////// it is prime
for(k = 3; i < 2000; k += 2)
p[k] = 0 ...