Jump to content
xisto Community

iikwalsemsiskweyrd

Members
  • Content Count

    10
  • Joined

  • Last visited

Everything posted by iikwalsemsiskweyrd

  1. #include <iostream>#include <cmath>using namespace std;bool isPrime( int i );int main(){ for( size_t i = 1; i < 1000; i++ ) { if( isPrime( i ) ) { cout<<i<<endl; } } system( "pause" ); return 0;}bool isPrime( int num ){ int limit = sqrt( static_cast<double>(num) ); if ( num == 2 ) { return true; } if ( num == 1 || num % 2 == 0 ) { return false; } for( size_t i = 3; i <= limit; i += 2 ) { if( num % i == 0 ) { return false; } } return true;} *system( "pause") was placed for the MSVS console not to automatically close. *newline at the end of the file if you are compiling with GCC.
  2. Fictionally, I want to drive a fully functional, transforming and battle ready Optimus Prime. In real world however, I want to drive a Ferrari Testa Rossa. One that seems like it would fly if you max out it's gas in the high way.
  3. I've been reading good reviews about Ubuntu's Easy Peasy. It's an OS which is created and optimized for a netbooks' limited battery life, screen size, memory, etc. It's minimalist UI also saves you a lot of eye strain from a very tiny screen.
  4. If you mean an HTML editor as in "a software that edits HTML files per se", I could say that gedit is the best in business. Notepad++ is also good but it is so Windows-y. If you mean an HTML editor as in "a WYSIWYG app with a drag and drop UI" then I think Dreamweaver is a good choice, though I'm not sure of it since I code HTML manually.
  5. building such programming language would render all software engineers useless. hehe. in the same way that a doctor who creates an immortalizing drug would render all doctors useless. so please, i discourage you from doing such feat. haha.
  6. There's really no single reason why the Roman Empire fell apart. Two major reasons I can think of are the incompetent emperors and the Germanic invaders.
  7. DAP or Download Accelerator Plus can speed up your download speed (not only youtube) by almost 200%. However you can only use it one download at a time and not for concurrent downloads because what it does is to make the browser instantiate many simultaneous connections to the server which in turn causes the browser to slow down on other tasks.
  8. the most feasible way to destroy the internet is by hitting it where it hurts the most. e.g. exploding the internet backbone the huge mass of underwater internet cables connecting servers across different islands.
  9. Looks cool but I'm doubting it's responsiveness. Can Google cloud servers handle a worst case scenario wherein every netbook user shifts to Chromium? Or if all Chinese people are to use Chromium? :angel: I guess lightweight processing such as typing, spreadsheets, etc. is manageable but what about programming or gaming tasks? Or is media playing possible? This issue must be addressed since majority of computer users including me easily get frustrated when the GUI lags every now and then. haha. Overall, its a good concept but they must really work on the front end to the extent that users cannot differentiate between Chromium and the traditional stand alone OS in terms of GUI responsiveness.
  10. #include <iostream>#include <sstream>using namespace std;void tallyNums( int [] );int tally[] = {0,0,0,0,0,0,0,0,0,0};int main(){ while ( true ) { int num[3] = {0}; cout<<"Enter 3 Numbers: "; cin>>num[0]>>num[1]>>num[2]; tallyNums( num ); cout<<"No. of Zero/s: "<<tally[0]<<endl; int otherNums = 0; for( size_t i = 1; i < 10; i++ ) { otherNums += ( ( tally[i] >= 1 ) ? 1:0 ); } cout<<"Other numbers: "<<otherNums<<endl; cout<<"Menu \n [A]dd \n [M]ultiply \n A[v]erage \n E[x]it\n Enter choice:"; string choice; double out = 0; string op = ""; cin>>choice; if( choice == "A" || choice == "a" ) { out = num[0] + num[1] + num[2]; op = "sum"; } else if( choice == "M" || choice == "m" ) { out = num[0] * num[1] * num[2]; op = "product"; } else if( choice == "V" || choice == "v" ) { out = ( num[0] + num[1] + num[2] ) / 3.0; op = "average"; } else if( choice == "X" || choice == "x" ) { break; } else { cout<<"error"<<endl; } cout<<"The "<<op<<" is "<<out<<endl; } return 0;}void tallyNums( int nums[] ){ ostringstream oss; oss<<nums[0]<<nums[1]<<nums[2]; string x = oss.str(); for( size_t i = 0; i < x.size(); i++ ) { tally[x[i] - '0']++; }}
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.