Sunday 22 November 2015

Magic 60



Spilling some secrets aint a big deal... unless they are a part of some government etc.. Well this is the oldest trick in the book. Well if you were directed here, then here is the layout.





And basically how it works..eish.. its best if you watch this video.
Magic 60 - BennySway

 You would see that i programmed the code for this game..
critics say if its done by a computer then its merely just a calculation, but its more impressive when done by a human being, with eyes closed lol. Anyway here is the code if thou needst art...hehe..(th).
======================
 #include<iostream>

using namespace std;

int main()
{
    int n,calc=0,magic=0;
    bool giveup=false;
    char choice,start,theEnd;


    cout<<"Magic 60"<<endl;
    cout<<"Think of a number from 1 to 60.\n";
    cout<<"Shall we proceed?y/n: ";
    cin>>start;

    if(start=='y'){
                cout<<"\n\nType '0' and press enter to quit anytime\n\n\n";
                cout<<"\t\tBox 1.\n";
                            n=-1;
                for(int row=1;row<=5;row++){
                    for(int col=1;col<=6;col++){
                        n+=2;
                        //if(n>=60)
                        //break;
                        cout<<n<<"\t";}
                        cout<<endl;}
                cout<<"\nDid you see youre number?y/n:";
                cin>>choice;
                        if(choice=='y')
                            calc+=1;
                        else if(choice=='n')
                            calc+=0;
                        else{
                                giveup=true;
                                cout<<"Dont believe in magic? Try next time.";
                            }}
                cout<<endl;
  //initializing the next box2.
    if(giveup!=true){
                cout<<"\t\tBox 2.\n";
                            n=1;        //reseting n
                for(int row=1;row<=5;row++){
                    for(int col=1;col<=6;col++)
                        {
                        n+=1;
                        magic+=1;
                        if(magic<=2)cout<<n<<"\t";
                        if(magic==3){
                            n+=2;
                            cout<<n<<"\t";
                            magic=1;}

                        }
                        cout<<endl;}
                cout<<"\nDid you see youre number?y/n:";
                cin>>choice;
                        if(choice=='y')
                            calc+=2;
                        else if(choice=='n')
                            calc+=0;
                        else{
                                giveup=true;
                                cout<<"Dont believe in magic? Try next time.";
                    }}

  //initializing the next box3.
    if(giveup!=true){
                cout<<"\t\tBox 3.\n";
                            n=3;        //resetting n
                            magic=0;    //resetting magic
                for(int row=1;row<=5;row++){
                    for(int col=1;col<=6;col++)
                        {
                        n+=1;
                        magic+=1;
                        if(n>60){cout<<"23";break;}
                        if(magic<=4)cout<<n<<"\t";
                        if(magic==5){
                            n+=4;
                            cout<<n<<"\t";
                            magic=1;}

                        }
                        cout<<endl;}
                cout<<"\nDid you see youre number?y/n:";
                cin>>choice;
                        if(choice=='y')
                            calc+=4;
                        else if(choice=='n')
                            calc+=0;
                        else{
                                giveup=true;
                                cout<<"Dont believe in magic? Try next time.";
                    }}

 //initializing the next box4.
    if(giveup!=true){
                cout<<"\t\tBox 4.\n";
                            n=7;        //resetting n
                            magic=0;    //resetting magic
                for(int row=1;row<=5;row++){
                    for(int col=1;col<=6;col++)
                        {
                        n+=1;
                        magic+=1;
                        if(n>60){cout<<"23";break;}
                        if(magic<=8)cout<<n<<"\t";
                        if(magic==9){
                            n+=8;
                            cout<<n<<"\t";
                            magic=1;}

                        }
                        cout<<endl;}
                cout<<"\nDid you see youre number?y/n:";
                cin>>choice;
                        if(choice=='y')
                            calc+=8;
                        else if(choice=='n')
                            calc+=0;
                        else{
                                giveup=true;
                                cout<<"Dont believe in magic? Try next time.";
                    }

 //initializing the next box5.
    if(giveup!=true){
                cout<<"\t\tBox 5.\n";
                            n=15;        //resetting n
                            magic=0;    //resetting magic
                for(int row=1;row<=5;row++){
                    for(int col=1;col<=6;col++)
                        {
                        n+=1;
                        magic+=1;
                        if(n>60){cout<<"23";break;}
                        if(magic<=16)cout<<n<<"\t";
                        if(magic==17){
                            n+=16;
                            cout<<n<<"\t";
                            magic=1;}

                        }
                        cout<<endl;}
                cout<<"\nDid you see youre number?y/n:";
                cin>>choice;
                        if(choice=='y')
                            calc+=16;
                        else if(choice=='n')
                            calc+=0;
                        else{
                                giveup=true;
                                cout<<"Dont believe in magic? Try next time.";
                    }}

 //initializing the next box6.
    if(giveup!=true){
                cout<<"\t\tBox 6.\n";
                            n=31;        //resetting n
                            magic=0;    //resetting magic
                for(int row=1;row<=5;row++){
                    for(int col=1;col<=6;col++)
                        {
                        n+=1;
                        magic+=1;
                        if(n>60){cout<<"23";break;}
                        if(magic<=32)cout<<n<<"\t";
                        if(magic==33){
                            n+=32;
                            cout<<n<<"\t";
                            magic=1;}

                        }
                        cout<<endl;}
                cout<<"\nDid you see youre number?y/n:";
                cin>>choice;
                        if(choice=='y')
                            calc+=32;
                        else if(choice=='n')
                            calc+=0;
                        else{
                                giveup=true;
                                cout<<"Dont believe in magic? Try next time.";
                    }}

//Evaluation
    cout<<"I now know the number youre thinking of...\n\nContinue?y/n:";
    cin>>theEnd;
    if(calc>60)
        cout<<"The number you thought of is indeed greater than 60, we didnt agree on that.\nThanks for playing anyway.";
    if(theEnd=='y'&&calc<=60)
    cout<<"You thought of the number "<<calc;
    if(theEnd=='n')
     cout<<"Dont believe in magic? Try next time.";
            }else
        cout<<"Dont believe in magic? Try next time.";
        //if(choice!='y'||choice!='n'||choice!='0')
          //  cout<<"\n\nThis program malfunctioned because it couldn't understand your input.\nClearly all it needed was a y/n...\nIs it that hard?\n\n";
    return 0;
}

=========================================



All truth cant and shall not stay hidden...unless you pay money for it to stay like that. lol.

No comments:

Post a Comment