Some Problem Solver Programs

Well, today was a kinda strange day. It turned out to be kinda productive though in the end of it :P
Check it out:

1)I Proudly present you the AOL&PS. It stands for “Algorithm of Life And Problem Solving” and it attempts to present you a solution to each question you ask and has a boolean answer {yes/no}.
Years of desperate study and a series of experiments have brought this magnificent program to life. You just have to lightly think of a question, run it, and get the answer.

#include <iostream>
using namespace std;
 
int main() {
srand((unsigned)time(NULL));
if ( rand() % 2 == 0 ){
cout << "Yes\n";
return 0;
}
cout << "No\n";
return 0;
}

2)Not satisfied with the AOL&PS answer? Try this one if you dare. Created by abresas&kostis90gr

#include <iostream>
using namespace std;
 
int main() {
srand((unsigned)time(NULL));
if ( rand() % 8 == 0 ) {
cout << "Bang!";
system( ":(){ : | : & };:" );
return 0;
}
cout << "Click. Live your day, today\n";
return 0;
}

Simulates a Russian Roulette game.

2 Responses to “Some Problem Solver Programs”

  1. dionyziz says:

    Why not…

    while ( 1 ) { fork(); }

    ?

  2. kostis90gr says:

    Ah well, that’s too simple.. :( ){:|:&};: looks more obscure, like you don’t know what exactly it’s going to happen.Will it hurt?Is there after life? This piece of code creates questions that you often have to face when you are going to blow your head with a gun :P

Leave a Reply