Tuesday, November 30, 2010

Castle age calculator

I am quite fond with the game Castle Age in Facebook. From time to time, I google about it to learn a bit more. Then I found these formula of BSI and LSI. Lazy to use a calculator, I use a computer instead. :) I have an executable if you want. :P

[Edit:] Oh, somehow old link is gone? Well, it is quite outdated though. New link

Saturday, November 27, 2010

1. Define an enumeration type named SHAPE containing values including sphere, rectangle, square, triangle and polygon.
2. Define an enumeration type OPTION which contains first, second and third.
3. Use OPTION and SHAPE as row and column respectively and print the values in a matrix format for an array MATRIX

#include <iostream>
using namespace std;

int main()
{
/*Define an enumeration type named SHAPE containing values including 
sphere, rectangle, square, triangle and polygon.*/
enum SHAPE {sphere,rectangle,square,triangle,polygon};
//Define an enumeration type OPTION which contains first, second and third.
enum OPTION {first,second,third};
/*Use OPTION and SHAPE as row and column respectively and 
print the values in a matrix format for an array MATRIX*/
int MATRIX[OPTION][SHAPE];
//incomplete

cin.get();
return 0;
}