Tuesday, 15 January 2013

Probability in c++





   /*Qusetion:
              3 dies are rolled
              i)Find the Sample space
              ii)Find the probability of an event that have sum of dots in
              3 die is more than 10 */


   #include <iostream>
   #include <conio>
   #include <stdlib>

     void main()

    {
            int i,j,k,n;
            float z;
           float  l=0.0; /*l has a data type float mean l store floating value like...1.0,2.3...... and here it count the
           event which grater than 10;*/
           float d=0.0;/*d also has a data type float and here use to count totall sample spaces(All possible cases which
           occure when 3 dies are rolled) */

           while(1)

           {

             cout<<"\t\t~~~~~~~~~~~~~~~~~~~~~~~\n";
            cout<<"\t\tWELCOM TO MAIN MENU\n";
             cout<<"\t\tWHAT DO YOU WANT \n\n";
              cout<<"\t\t~~~~~~~~~~~~~~~~~~~~~~~\n\n";
             cout<<"********************************************************************************\n";
             cout<<"\tPRESS 1 for sample spaces\t";
             cout<<endl<<endl;
             cout<<"\tPRESS 2 for An Event that has sum of 3 dots of die is grater than 10 \t ";
             cout<<endl;
             cout<<"\tPRESS 3 for Check probability of An Event that has sum of 3 dots of"<<endl;
             cout<<"        Dies are grater than 10\t";
             cout<<endl<<endl;
             cout<<"\tPRESS 4 for Exit from the Main Menu\t ";
             cout<<endl<<endl;
             cout<<"********************************************************************************\n";
             cin>>n;

             switch(n)
             {
             case 1:

                 cout<<"The sample spaces when 3 dies rolled are\n";
            for(i=1;i<=6;i++)   /*For first die D1={1,2,3,4,5,6}*/

            {
             for(j=1;j<=6;j++) /*For 2nd die D2={1,2,3,4,5,6}*/

             {
             for(k=1;k<=6;k++) /*For 3rd die D3={1,2,3,4,5,6}*/
             {
               cout<<i<<j<<k<<endl;
                 d++;
              }}
                                                                  /*d++ mean here it increament its value when one sample dispalay
              d=1,for 2nd sample d=2,and so d=1,2,3,4,5,.....................216*/
              } cout<<"The total sample spaces is=\t"<<d<<endl;
                break;

               case 2:


                cout<<"The sample space which is grater than 10 is\n";
               for(i=1;i<=6;i++)   /*For first die D1={1,2,3,4,5,6}*/

            {
             for(j=1;j<=6;j++) /*For 2nd die D2={1,2,3,4,5,6}*/

             {
             for(k=1;k<=6;k++) /*For 3rd die D3={1,2,3,4,5,6}*/
             {
             if(i+j+k>10)/*if is a conditional statemaent which is used here that sum of 3 dots of die is grater than 10*/
             {
              cout<<i<<j<<k<<endl;
                l++;


           }}} } cout<<"The sample spaces that have sum of 3 dots has grater than 10  Are\t"<<l<<endl;

           break;

             case 3:




             z=l/d;
               cout<<"The probability of P(A):\t"<<z<<endl;

               break;




             case 4:

         exit(0);
             break;


             }   }
    getch();}

Prime number in c++

#include <iostream>
#include <conio>


  class prime
  {

   private:
   int n,i,res;
   public:

   int input(int n)
   {


    for(i=2;i<=n-1;i++)
    {
     if(n%i==0)

     {
      return 0;
     }}





   if(i==n)
     return 1;

   }


   void show()
   {
    cout<<"Plz enter an integer\t\t";
    cin>>n;

    res=input(n);
    if(res==1)

    cout<<n<<"is prime\n";

   else
   cout<<n<<" is not prime\n";
   }

  };

  void main()

  {

  prime p;

  p.show();
  getch();}

THE MATRIX



              #include <iostream>
              #include <conio>
              #include <stdio>
              #include <windows>
              #include <stdlib>




              int main()

              {
                  int a;
                char str[45][45]={  "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"," "," "," ","!","?" "@","#","%","*","+"};

                system("TITLE THE MATRIX");
                system("color 2A");
                while(1)
                {
                   Sleep(25);
                   for(int i=0;i<20;i++)

                   {
                    a=rand()%42;
                    cout<<" "<<str[a];
                    cout<<" ";
                   }
                   cout<<endl;
                }


              getch();
              return 0;}

MY PYRAMID OF LIFE

MY PYRAMID OF LIFE

Talk--------------Softly
Walk---------------Humbly
Eat-------------------Sensibly
Breathe-------------------Deep?ly
Sleep---------------------Suff?iciently
Dress-------------------------?--Smartly
Act---------------------------?----Fearlessly
Work--------------------------?-------Patiently
Think-------------------------?----------Truthfully
Believe-----------------------?-------------Correctly
Behave------------------------?----------------Decently
Learn-------------------------?-------------------Practically
Plan--------------------------?-------------------------Order?ly
Earn--------------------------?---------------------------Hon?estly
Save--------------------------?----------------------------Re?gularly
Spend-------------------------?---------------------------Int?elligently
Love--------------------------?-----------------------------P?assionately



"I LUV MUSIC ND GUITAR SO MUCHH"
´´´´´´´´´´´´´o77¶øo7¶7´´´´´´´´?´´
´´´´´´´´´´´´´´´¶¢ø¢ø¶´´´´´´´´´?´´
´´´´´´´´´´´´´´´¶øø¢o7´´´´´´´´´?´´
´´´´´´´´´´´´´´o¶o¢ø´´´´´´´´´´´?´´
´´´´´´´´´´´´´´¶¶øøøo´´´´´´´´´´?´´
´´´´´´´´´´´´´o¶o$øøø´´´´´´´´´´?´´
´´´´´´´´´´´´´$ø¢¶oø¶7´´´´´´´´´?´´
´´´´´´´´´´´´ø¶øø¶¢o7´´´´´´´´´´?´´
´´´´´´´´´´´´7ø77o$´´´´´´´´´´´´?´´
´´´´´´´´´´´´´´ø¶¶¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´´¶¶$¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´´$ø¶¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´´¶¶$¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´´¶øø¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´´¶¢¶¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´´¶¢$¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´1¶¢¶¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´1¶¢¶¶´´´´´´´´´´´´?´´
´´´´´´´´´´´´´ø¶o¶¶¢´´´´´´´´´´´?´´
´ø¶¶¶¶´´´´´´´ø¶7¶¶$´´´´´´´´´´´?´´
´¶¶$¶¶´´´´´´´$¶o¶$$´´´´´´´´´´´?´´
´¶¶øø¶´´´´´´´ø¶ø¶¶¶´´´´´´´´´´´?´´
´¶¶øø¶¶´´´´´´¢$¢¶¶ø´´´´´´´´´´´?´´
´ø¶$ø$¶¢´´´´´$¶oø¶¶´´´´´´´´´´´?´´
´1¶¶øø¶¶o´´´´oøo¶¶¶´´´´´´$¶¶¶ø?´´
´´¶¶øøø¶¶¶¶¶¶$øo$ø¶´´´´´ø¶7´ø¶?´´
´´´¶¶ø$¶´¢¶¶¶¶¶1¶¶¶´´´´´¶¶´´¶¶?´´
´´´ø¶$$¶´´´´´ø$o¶$¶´´´´¶¶o´´¶o?´´
´´´´¶¶$¶¶´´´´¶¶$¶¶¶¶¶¶¶¶´´´7¶´?´´
´´´´´¶¶$¶o´´´1777177¢o1´´´´¶o´?´´
´´´´´´¶ø¶¶´´77´´o´´´´´´´´´¶¶´´?´´
´´´´´´¶ø$¶$1¶¶¶¶¶¶¶¶71´´´¶¶´´´?´´
´´´´´´¶øø¶¢´´´´´´´´´´´´´´¶¶´´´?´´
´´´´´1¶øø¶¶´¶¶¶¶¶¶¶¶7´´´´¶o´´´?´´
´´´´7¶¶ø$¶´´oøøø¶¶¶¶´´´7´¶o´´´?´´
´´´o¶¶øø¶¶´´øø´´´´´´´´1ø$¶¶o´´?´´
´´1¶¶øø¶¶o´1¶¶¶¶¶¶¶¶1´´´´¶ø¶¶´?´´
´´¶¶øøø¶ø´´´´´´´$$¶¶´´´´´´´´¶¶?´´
´ø¶$øø$¶´´´´17´´7´´´´´´´´´´´7¶?ø´
´¶¶øøø$¶´´´´´o1´o´11´´´´´´´´´¶?¶´
´¶¶øøøø¶ø´´´´´´´1´´´´´´´´´´´´7?¶´
´¶¶øøøø$¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶7´´´´?¶´
´¶¶øøøøøøøøø$$$ø$$$ø$øø¶¶¶ø´´´?¶7
´ø¶¶øøøøøøø$$¢ø$¶1¶$$¶ø¶1$¶¶7$?¶´
´´ø¶¶¶$øøøø$øø¶¢¶oø$$$ø$´o¶¶¶¶?´´
´´´´$¶¶¶¶¶¶$¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶´´?´´
´´´´´´´´´1oooooøøooooo77´´´´´´?´´

I AM NOT A ROCKSTAR,
I AM NOT A CELEBRITY,
I AM NOT A FAMOUS CHARACTER,
I AM............. @ !_ !

------------------------------?------------------------------?----------
¦1% Ugly

¦¦ 22% Liar

¦¦¦ 30% Music

¦¦¦¦ 40% Evil

¦¦¦¦¦ 52% Good

¦¦¦¦¦¦ 60% Imba :DD

¦¦¦¦¦¦¦ 70% Crazy!!

¦¦¦¦¦¦¦¦ 80% Cute

¦¦¦¦¦¦¦¦¦100% Me

Frndz r my life & my every frnd is my best frnd ....

|““““““““““““““““““““““““||_
|............*LOVE *...........|||“|““__
|________________ _ |||_|___|)
!(@)“(@)““““**!(@)(@)***!(@)““

|““““““““““““““““““““““““||_
|.....*AFFECTION*.........|||“?|““_
|________________ _ |||_|___|)
!(@)“(@)““““**!(@)(@)***!(@)““

|““““““““““““““““““““““““||_
|............*JOY*............?...|||“|““___
|________________ _ |||_|____|)
!(@)“(@)““““**!(@)(@)***!(@)““

|““““““““““““““““““““““““||_
|.......*FRIENDSHIP*......|||“?|““_
|________________ _ |||_|__|)
!(@)“(@)““““**!(@)(@)***!(@)““

|““““““““““““““““““““““““||_
|.......*HAPPINESS*.......|||“?|““__
|________________ _ |||_|___|)
!(@)“(@)““““**!(@)(@)***!

------------------------------?------------------------------?----------
...........................++_??_++
...........................+T¦? ¦T+
..............................?]¦¦[
..............................?]¦¦[
.................++____++¦¦++_?__++
...............?.] heart hacker----+|+----[?
.................++?????¦¦¦¦¦?????+
............................ ¦¦¦¦¦
............................ ¦¦¦¦¦
............................. |¦¦¦|
............................. |¦¦¦|
............................. |¦¦¦|
............................. |¦¦¦|
............................. |¦¦¦|
............................. |¦¦¦|
............................. |¦¦¦|
............................. |¦¦¦|
............................. \¦¦¦/
..............................? \¦¦/
..............................?. \¦/
..............................?.. \/

Dimond program in c++ source code



  #include <iostream>
  #include <conio>

                            void main()
                            {

                             int i,j,k;

                             for(i=5;i>=1;i=i-2)

                             {
                               for(j=0;j<=i;j++)

                               cout<<" ";

                               for(k=5;k>=i;k--)



                               {
                                cout<<"*"<<" ";
                               }

                               cout<<endl;
                             }
                             for(i=7;i>=1;i=i-2)

                             {
                              for(j=7;j>i;j--)


                              cout<<" ";

                              for(k=1;k<=i;k++)

                              {
                               cout<<"*"<<" ";
                              }

                              cout<<endl;



                             }

                            getch();}

System Shut down program in c++ using borland

#include <iostream>
       #include <conio>
       #include <windows>

       void main()

       {
        int  opt;
        cout<<"\t\twhich type of window you have\n\t\tEnter one for shoutdown for windows xp\n\t\tEnter 2 for windows 7\n";

        switch(opt)
        {
         case 1:
         system("C:\\WINDOWS \\System32\\shutdown-s-t-0");

         break;
         case 2:
         system("C:\\WINDOWS \\System32\\shutdown/s/t 0");
         break;

        }



       getch();}

Friday, 11 January 2013

How to set java Compiler

1.      First goto url= jdk1.6 download the jdk1.6
2.       After Installing jdk1.6 in your computer.
3.      C:\Program Files\Java\jdk1.7.0\bin; copy this and goto the desktop
4.      Right click on the mycomputer and select the properties.
5.      Select the advanced system setting 
6.      Select the  Advanced
7.       Select the Environment Variables
8.      In System Variables Select the New.
9.      In  Variable name field paste C:\Program Files\Java\jdk1.7.0\bin;
10.  In   variable value write path and press ok
11. Then goto Run and type cmd 
12. write javac if javac compiler instruction appears there then you successfully set the compiler.

Sunday, 6 January 2013

FAQ: Interactive TV



Is the quality better?

Without a doubt! Interactive tv is a form of digital tv and that means nothing more than razor sharp images and lots of eye for detail. A regular tv is analogue and that results in static. The images are granular and that won
t happen with interactive tv.

Do I get a say in what I watch?

As a matter of fact, you get to choose everything yourself. With a regular tv you
re forced to turn to your tv guide. This isnt the case with interactive tv. You can choose whatever you want to watch, whenever you want to watch it. Its no problem is youve missed something youd wanted to watch, because you can tape the stuff you want to see! Another advantage is that you can skip those annoying, long commercial breaks. This of course, is impossible with a normal tv.

Is it true I get more channels?

You sure do. Digital or interactive tv means a lot more channels than you get on your regular tv. Lots of foreign channels, but also theme channels about travelling, cooking, cars
basically any subject has its own channel! Of course sports and films have their own channels too, but youll have to pay extra for those.

What
s that, no more commercials?

Sounds good, doesn
t it? It is! Because you can fast-forward through movies and programs, you no longer need to endure those endless annoying commercial breaks. Toilet paper, tampons, shampoofrom now on theyre only in your own bathroom, not on tv!

So, I control what I
m watching?

Abso-freaking-lutely! You
re the one whos in control with interactive tv. Walk the dog while your watching? Just pause it! Interrupting airings is possible when you feel like it and you can resume watching. when it suits you. You no longer need to miss parts of the programs you were watching. Just pause and continue, whenever youre ready.

What if I miss something I wanted to watch?

Just watch it anyway! If you
ve got interactive tv, you can tape the things youll want to watch at another time. And you can also watch everything youve missed today or yesterday with Missed Airings. The whole grid of the three main channels is available, but you can rewatch other channels too. Just adjust your subscription.

Can I watch movies?

Even better, you can bring home the video store! With one push of the button you
ll enter a long lists of movies you can watch. Apart from those there are also lots of tv series available. Just sit back and watch whatever you want without having to leave the house on a rainy day.

Why is it called interactive?

One of the reasons is the fact that with interactive tv you can actually be part of what
s on the tube. Give the answers in a game show, guess the questions during a test; just use the remote control to vote or to select your answer.

Is it hard to get?

Of course not. Though it might sound complicated, it really isn
t. Just install the box and youre good to go!

Get Better Internet



Faster is better

Just think about it: how exactly do you use your Internet? Because if you
re thinking about getting a new internet subscription, its important you know how you use internet in the first place. Theres no reason whatsoever to get a very quick (thus more expensive) connection when all you do is write emails and surf around. A basic subscription will do. However, if you download a lot and there are several internet users around, you will need faster internet with a higher download and upload speed. Choose the subscription that suits the way you use internet. That way you wont pay for something you wont use. No one likes paying too much, huh?

Save money on stable WWW

Whether you
ve got super fast or standard internet, it has no influence on the stability and reliability of the internet connection. Theyre both connected to the same network and speed has no influence on it, nor has in any influence in static or interruptions. But if you get a fast subscription right now, the first three months wont cost you a thing. Depending on which deal you choose, this means youre saving a lot of money. But this isnt the only cool deal around, there are lots of different subscriptions to choose from and they all come with cool, money saving perks. If, for example, you like to extend your subscription with some extra security measures, it will be cheaper when you fix this with your provider than when you take care of it yourself. Saving money is good!

Come prepared: compare

It
s definitely a must to do some decent research before getting an internet subscription. Of course the costs are a valid reason to check things out, but there are other perks you want to make sure not to miss. Get the most out of your description, for example with a combination of digital (or high definition) tv or phone? Usually there are deals around and you want to check them out. Save money and see for yourself what are the cons and pros. Every offer has its cool perks, choose the best one! Except for the costs its wise to do a bit of research before you subscribe to a provider. Of course speed is a reason, but also the possibilities to make to most out of your internet connection. Lots of choices!

In short

Let
s recap. Its important you know how you use internet while choosing an internet subscription. Dont get a very quick (thus more expensive) connection when all you do is write emails. A basic subscription will do. However, if you download lots of stuff and there are several internet users around, you definitely need faster internet with a higher download and upload speed. So choose the subscription that suits the way you behave online. That way you wont pay for something you wont use. Super fast or standard internet, it has no influence on the stability and reliability of the internet connection. Theyre both connected to the same network and speed has no influence on it! The only influence is noticeable in your wallet! Nice.