#include <iostream>using namespace std; int P[100], S[100/32]; bool check(int n, int p){ return (bool) (n & (1<<p));} int set(int n, int p){ return n = (n | (1<<p));} void bitSieve(int n){ int i, j, lim = sqrt(n); for(i=3; i<=lim; i+=2) { if(!check(S[i/32], i%32)) for(j=i*i; j<=n; j+=i*2) S[j] = set( }} int main(){ return 0;}
Standard input is empty
prog.cpp: In function 'void bitSieve(int)': prog.cpp:18: error: 'sqrt' was not declared in this scope prog.cpp:24: error: expected primary-expression before '}' token prog.cpp:24: error: expected `;' before '}' token
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!