All pastes #1059836 Raw Edit

Miscellany

public cpp v1 · immutable
#1059836 ·published 2008-07-01 18:48 UTC
rendered paste body
#include<iostream>#include "boost/lexical_cast.hpp"using namespace std;using namespace boost;int main(){  // Here goes nothing!  string pool;  // Here be sum!  long sum = 0;  // Here be digit pool swimming extravaganza!  for(int i = 0; i <= 100000; i++)  {    pool = lexical_cast<string>(i);    // Here be dragons!    for(string::iterator it=pool.begin(); it < pool.end(); it++)      {	if (lexical_cast<int>(*it) != 3 || lexical_cast<int>(*it) != 5 || lexical_cast<int>(*it) != 7)	  {	    //      cout << lexical_cast<long>(*it) << endl; // Debugging	    sum += lexical_cast<long>(*it);	  }      }    }  // Here be hope!  cout << sum << endl;}