Wednesday, June 9, 2010

New magical CPP (C++) program!

Hey guys,
 After a little experience in C++ program, i had developed a magical C++ program, which would find the number you thought! please try that program, or download it from My google group! (http://groups.google.com/group/express-cling/files)

 Source Code:

 #include
#include

using namespace std;

int main()
{string name;
int ans;
    cout<<"Please enter your name to continue!\n";
    getline(cin,name);
    cout<<"Welcome Mr./Ms./Mrs. "<<<"\n";
    cout<<"Welcome to the mathematical magical game!\n\n\n";
    cout<<"Following this you will see a list of numbers\n\nThink a number from among those numbers, and answer the following questions correctly!\n\n";
    cout<<"Line1  Line2  Line3  Line4   Line5\n";
    cout<<"1\t2\t4\t8\t16\n";
    cout<<"3\t3\t5\t9\t17\n";
    cout<<"5\t6\t6\t10\t18\n";
    cout<<"7\t7\t7\t11\t19\n";
    cout<<"9\t10\t12\t12\t20\n";
    cout<<"11\t11\t13\t13\t21\n";
    cout<<"13\t14\t14\t14\t22\n";
    cout<<"15\t15\t15\t15\t23\n";
    cout<<"17\t18\t20\t24\t24\n";
    cout<<"19\t19\t21\t25\t25\n";
    cout<<"21\t22\t22\t26\t26\n";
    cout<<"23\t23\t23\t27\t27\n";
    cout<<"25\t26\t28\t28\t28\n";
    cout<<"27\t27\t29\t29\t29\n";
    cout<<"29\t30\t30\t30\t30\n";
    cout<<"31\t31\t31\t31\t31\n\n\n";
    cout<<"Where were your NO. found?\n\nFor example:\n If your no. (say 22) then you must enter 235(i.e in lines 2 , 3 and 5 hope you understand!)\n\n";
    cin>>ans;
    switch(ans)
    {
        case 1: cout<<"You thought 1\n";
        break;
        case 2: cout<<"You thought 2\n";
        break;
        case 3: cout<<"you thought 4\n";
        break;
        case 4: cout<<"you thought 8";
        break;
        case 5: cout<<"you thought 16";
        break;
        case 12: cout<<"you thought 3";
        break;
        case 13: cout<<" you thought 5";
        break;
        case 14: cout<<"you thought 9";
        break;
        case 15: cout<<"you thought 17";
        break;
        case 1345: cout<<" you thought 29";
        break;
        case 145: cout<<" you thought 25";
        break;
        case 1245: cout<<" you thought 27";
        break;
        case 245: cout<<" you thought 26";
        break;
        case 25: cout<<"you thought 18";
        break;
        case 35:cout<<" you thought 20";
        break;
        case 345:cout<<" you thought 28";
        break;
        case 24: cout<<" you thought 10 ";
        break;
        case 124: cout<<"you thought 11";
        break;
        case 125: cout<<"you thought 19";
        break;
        case 134: cout<<"you thought 13";
        break;
        case 135: cout<<"you thought 21";
        break;
        case 123: cout<<"you thought 7";
        break;
        case 1234: cout<<"you thought 15";
        break;
        case 12345: cout<<"you thought 31";
        break;
        case 23: cout<<"you thought 6";
        break;
        case 234: cout<<"you thought 14";
        break;
        case 2345: cout<<"you thought 30";
        break;
        case 34: cout<<"you thought 12";
        break;
        case 45: cout<<"you thoght 24";
        break;
        default:
        cout<<"ERROR!(don't try to cheat me!) Else contact stylishrino007@gmail.com";
    }
    return 0;
}

Saturday, May 8, 2010

Open source!

Hi Guys,
             Let's see about an open source WONDER today. I downloaded HUGIN (Panorama stitcher).Until then i was not aware of any PANORAMAS!. Once i downloaded it, i was wondered about its usage.It was really a cool freeware/(OPEN SOURCE). You too could try it fro your personal use......And there are lots of tutorials to learn about HUGIN.....

Link to website : http://hugin.sourceforge.net/

Sunday, April 11, 2010

New Logo!


Guys, i am gonna upload my new logo for express-cling!, i want your comments for further developments.

Simple C++ programs!

Hi guys,
             I am glad to upload my simple C++ calculator and a simple interest calculator on my group....  Express-cling.(link : http://groups.google.com/group/express-cling/).


Note:
These are simple programs, calculator enables you to do only simple arithmetical operations, and simple interest calculator allows you to calculate the Simple interest!

For Source code:


Calculator:




#include
#include
#include
#include
void main()
{
char name[20];
float a,b,ADD,SUB,MUL,DIV;
int con,end,opt;
clrscr();
cout<<"Enter your Name please : \n";
gets(name);
cout<<"welcome to THE CALCULATOR, Mr."<<<"\n\n\n";
cout<<"This calculator will enable you to do simple arithmetic operations like ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION \n\n\n";
con:
cout<<"Enter two nos.....\n\n";
cin>>a>>b;
cout<<"What do you want to d Mr."<<<"\n\n 1. ADDITION \n2. SUBTRACTION \n3. MULTIPLICATION\n 4.DIVISION\n\n";
cout<<"enter your choice (1,2,3,4 ?)\n\n\n";
cin>>opt;
switch (opt)
{
case 1 :
ADD=a+b;
cout<<"the addition of two nos. is : "<<<"\n";
break;
case 2:
SUB=a-b;
cout<<"The subtraction of two nos. is "<<<"\n";
break;
case 3:
MUL=a*b;
cout<<"the multiplication of two nos. is "<<<"\n";
break;
case 4:
DIV=a/b;
cout<<"the division of two nos. is "<
<<"\n";
break;
default : cout<<"BUG!\n";
}
cout<<"Press <1> to continue, <2> to exit!\n\n";
cin>>opt;
if (opt==1)
goto con;
else
goto end;
end:
getch();
}




Simple Interest Calculator:


#include
#include
#include
#include
void main()
{
char name [20];
int a,c,b,x,e,opt,si;
float p,n,r;
clrscr();
cout<<"Welcome to INTEREST CALCULATOR\n";
cout<<"Enter your name please\n";
gets(name);
a:
cout<<"Enter the required fields!\n";
cout<<"Principal =\n";
cin>>p;
cout<<"No.of yrs =\n";
cin>>n;
cout<<"rate of interest =\n";
cin>>r;
cout<<"\tPrincipal =Rs. "<
<<"\n\n\tNo.of years = "<<<"\n\n\tRate of interest = "<<<"%\n\n";
cout<<"Simple interest\n";
si=(p*n*r/100);
cout<<"Simple interest = Rs. "<<<"\n";
cout<<"Press <1>to continue <2>to exit\n";
cin>>x;
if (x==1)
goto a;
else if(x==2)
goto b;
b:
getch();
}

Saturday, April 3, 2010

Sorry!

Hi viewers ,
I feel sorry for not updating my websites often, since busy reading books (Being a 10th student!), and from April 10th onwards i will develop my website with fun programs!!!!