[ create a new paste ] login | about

Link: http://codepad.org/a5dYI6c8    [ raw code | output | fork ]

C++, pasted on May 12:
#include <iostream>
using namespace std;
     signed long int limit;
     signed long int count = 1;
     signed long int curNum = 3;

// Declaration of checkprime() function
bool checkprime(int){return true;}

int main(){

     cin >> limit;

     do{
          if(checkprime(curNum) == true){
               count++;
          }
          curNum += 2;
     } while(count < limit);

     return 0;
}


Output:
1
2
3
In function 'int main()':
Line 16: error: reference to 'count' is ambiguous
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: