first of all, thank you so much for putting up the contest. i was about to go nuts when i played the game the british corporation logos just made me feel that this was something done by extremely brilliant people and there was some sort of AI built into it.. anyway thanks again.
Its only been recently since I started to code my own programs of Intermediate complexity..and coding your challenge has been really a pleasurable experience..
it might not be so efficient or very well structured but its something i came up with.
enough blabber heres the code. please do give your review and please your tips how to improve..and I have tested it many times, hope its correct..
Code:
#include <iostream.h>
#include <stdlib.h>
#include<conio.c>
#include<stdio.h>
int main()
{
while(1)
{
int j=1,temp,i,print_complete;
char choice;
char multiple_9= (rand()%20)+14;
//cout<<multiple_9;
cout<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"********************************************************************************";
cout<<endl<<endl<<endl<<"================================================================================";
cout<<endl<<endl<<endl<<"\t"<<"@@@@@@ YOU HAVE ENTERED THE GATES OF THE MATH GENIE !!!! @@@@@";
cout<<endl<<endl<<endl<<"\t\t"<<"!!!!!! GET READY TO BE MESMERIZED !!!!!!";
cout<<endl<<endl<<endl<<"================================================================================";
cout<<endl<<endl<<"\t\t PRESS ENTER IF YOU DARE TO CONTINUE";
cout<<endl<<"********************************************************************************";
cin.get();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n";
cout<<endl<<"********************************************************************************";
cout<<endl<<endl<<endl<<endl<<endl<<endl<<"\t THINK OF A NUMBER WITH TWO DIGITS (FOR EXAMPLE 43)";
cout<<endl<<endl<<endl<<"\t\t\t PRESS ENTER TO CONTINUE";
cout<<endl<<"********************************************************************************";
cin.get();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n";
cout<<endl<<"********************************************************************************";
cout<<"\n\n\nNOW ADD THE TWO DIGITS OF THE NUMBER(EXAMPLE: 4+3=7)";
cout<<endl<<"********************************************************************************";
cin.get();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n";
cout<<endl<<"********************************************************************************";
cout<<"\n\n\nNOW SUBTRACT THE NEW NUMBER FROM YOUR ORIGINAL NUMBER(EXAMPLE: 43-7=36)";
cout<<endl<<"********************************************************************************";
cin.get();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n";
cout<<endl<<"********************************************************************************";
cout<<"\n\nFINALLY LOOK AT THE SYMBOL NEXT TO YOUR NUMBER AND REMEMBER IT";
cout<<endl<<"********************************************************************************";
cin.get();
clrscr();
cout<<endl<<endl<<endl;
for(i=95;i>=0;i--)
{print_complete=0;
temp=i;
j=1;
while(j<10)
{
if(temp>=0)
{
cout<<temp<<" ";
if((temp%9)==0)
cout<<multiple_9<<" ";
else
cout<<(char)((rand()%10)+14)<<" ";
}
if(temp==8)
{
print_complete=1;
break;
}
temp=temp-11;
j++;
}
if(print_complete==1)
{
break;
}
cout<<endl<<endl;
}
cout<<"\n\n\nPRESS ENTER TO CONTINUE";
cin.get();
clrscr();
cout<<"\n\n\n\n\n\n\n";
cout<<endl<<"********************************************************************************";
cout<<endl<<endl<<"\t\t\tTHE SYMBOL YOU REMEMBERD IS :"<<multiple_9;
cout<<endl<<"********************************************************************************";
cin.get();
clrscr();
cout<<"\n\n\n";
cout<<endl<<"********************************************************************************";
cout<<endl<<endl<<endl<<"\t\t\tDARE TO TRY AGAIN???? IF NO,PRESS N"<<endl;
cout<<endl<<"********************************************************************************";
cin>>choice;
if(choice=='n'||choice=='N')
break;
}
}
its 1.00 am here..So I go to bed satisfied of having tried for so long.