Tuesday, July 6, 2010

PETROL IS WASTED IN THIS WAY ALSO

Petrol is wasted in many ways in this world. One simple example,
In many house each individual use separate vehicle instead of one common vehicle, most of the times.
Instead of using public vehicle we all use separate vehicle for us all the times.

    So there is large amount on increase in the number of vehicles everyday.

I use a vehicle for my home purposes.That vehicle is used by my family members also. But I have planned to buy a vehicle for me when i start to earn. So I dont think getting a separate vehicle for our own use is unstoppable. But using it occasionally and during only urgent use is reasonable. I do the same almost all my days until now.

What i want to discuss with you all is,
You can see this incident happening in most of the petrol bunks.

We can see that atleast one drop of petrol is being poured near the petrol tank's mouth of our vehicles because of urgency and also more than 2 ml petrol is wasted like this per vehicle during peak(office) hours as there is a long queue of vehicles standing in the petrol bunk.They wants to satisfy all the customers and also we want to be filled it very quick as we are late to the office and other work.
Metric says that 1 drop = 0.05ml(20 drops per millilitre.
Census shows that average petrol consumption is more than 1,000,000

And the number of VEHICLES is you can imagine it. My opinion is atleast near 50% of the total population. Check this site for vehicle population
So petrol wasted is nearly 0.05 * 100000 is 5000 Litres per day. 

Clcik this link to check the average number of vehicles
http://www.cbc.ca/fifth/roadwarriors/trends.html.
 
Now just think if the petrol is wasted for every litre for almost 1crore vehicle for every 5 crore people then each day then the result of petrol wasted is to be taken into mind. These resources are dereasing each and everday. I want all of you to use it in a best way without even wasting a drop. Pkease be sure that you are not urgent and also the workers are not urgent to stop wasting petrol in this way.

Friday, July 2, 2010

ENHANCE YOUR GENERAL KNOWLEDGE

  • GSM     - Global Satellite Mobile
  • CDMA  - Code Division Multiple Access
  • GPS       - Global Positioning System
  • GPRS    - General Packet Radio Service
  • 3G          - 3'rd Generation
  • SIM       - Subscription Identification Module
  • WAP      - Wireless Application Protocol

GUYS CHECK YOUR CONCENTRATION BY PLAYING THIS GAME

I have submitted a simple game to test your concentration in any form of work.

As it is not possible to upload files in the blog I uploaded it in a different site. Download the game and play and pass it to all your friends.

Click the Link to Download : http://www.mediafire.com/?vdy2yo3mj1l

Install the SHOCKER.EXE SETUP and play the game.
Dont forget to leave a reply...:-)
(THIS PROGRAM NEEDS DotNet Framework 2.0 FOR EXECUTION. Click the below Link to Download)

Click Here

Tuesday, June 22, 2010

Program to Print the number words in a string and Print in a Specified Format

#include"iostream.h"

void main()
{
 char a[100];
 int i=0,j=0,n[10],wn=0,count=0,n1[10] = {0,0,0,0,0,0,0,0,0,0},n2;
 clrscr();
 printf("\n PLEASE END THE STRING BY USING ( . ) SYMBOL TO GET THE CORRECT OUTPUT\n\n   ");
 gets(a);
 while(a[i] != '\0')
 {
  if(a[i] == ' ' || a[i] =='.')
  {
   n[j] = i-wn;
   wn = i+1;
   j++;
   count++;
  }
  i++;
 }

 cout <<"\n NUMBER OF WORDS : "<<"\n";

 for(i=0;i < count;i++)
 {
   n2 = n[i];
   n1[n2]++;
 }

 for(i=1;i < 10;i++)
 {
  cout << "\n NUMBER OF "<<  i <<" LETTER WORD : " <
 }
 getch();
}



INPUT
PLEASE END THE STRING BY USING ( . ) SYMBOL TO GET THE CORRECT OUTPUT
I AM HAPPY.
(END THE STRING WITH . SYMBOL)


OUTPUT WILL BE LIKE THIS
NUMBER OF 1 LETTER WORD 1
NUMBER OF 2 LETTER WORD 1
NUMBER OF 3 LETTER WORD 0
NUMBER OF 4 LETTER WORD 0
NUMBER OF 5LETTER WORD  1
NUMBER OF 6 LETTER WORD 0

Sunday, June 13, 2010

Signs Of Aged World Counting Its Days...!???

A mild earthquake (tremor) has been reported in various parts of Chennai in the early morning on Sunday, June 13, 2010. The tremor lasted for about 15-20 seconds and it was felt in areas including Chintadripet, Thiruvanmiyur, Santhome, Choolaimedu, Koyambedu, Royapettah and Aminjikarai.


After the Earthquake A few mins later all the persons sleeping in Marina Beach were cleared as there is Tsunami warning all over 7 countries in the world. Actually this ia a tremor felt in Chennai and other regions due to 7.7 Earthquake in Nicobar Islands.

Several parts of Sri Lanka experienced tremors following the earthquake, according to the head of the country's Geology and Mines Bureau, D Wijayananda.

Tuesday, June 1, 2010

PALINDROME PROGRAM IN C++ WITH EXPLANATION.. This will be correct logic which everyone expects



 What we have to do is
i)                    Find the length of the string
ii)                   Divide the length of the string by 2. Because from the first element in the array we should go until the predecessor of middle element and then from the last we go until the successor of the middle element Take this as an example
If this is the input string “LIRIL”. Here the middle element is a[3] = ‘R’, to find whether it is palindrome or not we should check as given in the diagram. Then we should compare the last element and with the first element. Like        

1.      We check the last element a[5] and the first element a[1].
2.      We check the second from the first a[2] with the second from the last a[4].
              
                  Middle element need not to be checked because it positions will not be changed if the string is reversed. This the logic behind this program.

If the length of the string is even( EG, 4 OR 8 OR 10) then there will be no middle element as given in the above example.

For eg) for the string “KAIL

                        

void main()
{
 int i,j,n=0,n1,cnt=0;
 char a[20];
 clrscr();
 printf("\n ENTER THE STRING : ");
 cin>>a;

// Here we get calculate the length of the string
 while(a[n]!='\0')
 {
 n =n+1;
 }
// Completes here

// To find the middle value. If the length is a even number it takes the value 0.
 n1 = n/2;
//completes here

/* This loop check the a[i] before n1 with a[j] until before n1. Remember a[i] starts from the first and b[j] starts from the last index */

for(i=0,j=n-1; i < n1 && j  >  n1; i++, j--)
 {
   if(a[i] == a[j])
    cnt++;
  else
  {
   printf("\n THE STRING IS NOT A PALINDROME");
   break;
  }
 }
 if(cnt == n1)
  printf("\n THE STRING IS A PALINDROME");
getch();
}

Sunday, May 30, 2010

Genius in Computer can answer for this question

In Windows Operating System

You cannot create a folder in any part of the computer with the name 'con'.
                           Create a new folder by Right Click-> New -> Folder

                           Then Right Click on it and check whether you can change it to the name 'con'.

I do not know the REASON for this. If you can,answer me.

All your suggestions are most welcome.

Thursday, May 27, 2010

A C Program to find the given sring is Palindrome or not Without using String Functions

#include"iostream.h"
#include"stdio.h"
#include"conio.h"

void main()
 {
  int i=0,j=0,n=0,cnt=0;
  char a[20],b[20];
  clrscr();

  printf(" ENTER THE STRING : ");
  cin>> a >> b;

  //TO FIND THE LENGTH WITHOUT USING STRLEN() FUNCTION
  while(a[n] != '\0')
   n = n+1;

  //TO REVERSE THE STRING WITHOUT USING STRREV() FUNCTION
  for(i=n-1;i > = 0 ; i--)
  {
   b[j] = a[i];
   j++;
  }

  //TO COMPARE THE STRINGS WITHOUT USING STRCMP() FUNCTION
  for( i = 0;i < n; i ++)
  {
   if(a[i] == b[i])
   {
    cnt++;
   }
   else
   {
    printf("GIVEN STRING IS NOT A PALINDROME");
    break;
   }
  }

   if(cnt == n)
   {
    printf("GIVEN STRING IS A PALINDROME");
   }
  getch();
}

Friday, May 14, 2010

MY SUGGESTIONS FOR BCCI AND INDIAN T20 TEAM

Strength of all other teams in world cricket is their fast bowlers
(Speed generated by them are given approximately in average)
AUSTRALIA                          - Shaun Tait - 155kmph
                                                   Mitchell Johnson - 150kmph
                                                   Dirk Nannes - 145kmph etc etc

SOUTH AFRICA                   - Daryl Steyn - 150kmph
                                                   Morne Morkel - 145kmph

NEW ZEALAND                   - Shane Bond -   150kmph

In this way every team has good fast bowlers and also other swing bowlers.

But Our team does not have any such bowlers who are really consistent. Clearly We have seen that INDIAN'S are struggling to hit face bowlers like above mentioned.(especially short pitch ball).

India is in a situation where it desperately need a couple of young guns who can bowl more than 145kmph CONSISTENTLY!.

If India get such a bowlers, indians can practise the fast bowlers short pitch tactics as well as they can make the opponent batsmans tremble as all the other teams.

So my only suggestion is India need a couple of fast bowlers. A Training program should be made and properly monitered under the supervision of legends like KAPIL DEV etc etc to make India successfull in the World's stage.

Friday, April 2, 2010

I Have submitted some Programs to understand C#

STEP 1

   // A simple program to explain the structure of a C# program
    class Program
    {
        static void Main(string[] args)
        {
            System.Console.WriteLine(" FIRST STEP FOR A C# PROGRAM");
            Console.ReadLine();
        }
    }

* This is purely Object Oriented approach so everything must me contained in a class.
* Like the header files, here we have namespaces. Here System is a namespace and Console is a class  
   contained in that namespace. Writeline is function to display the output.
* We dont have function like getch() to make the cursor wait at the output screen. Instead of that we can  
   give the statement  Console.ReadLine();
* Again ReadLine() is a function in console class.

FRIENDSHIP


Friendship is always kind and patient.It is never jealous.
Rude at the times of bad things.
It does not have fence.
It is always a pleasure.
It is always ready to excuse whatever done, to hope till last breathe and into endeavour.

Friends are those who remebers the song in your heart and reminds you the lyrics when you forget it.

Dont ever miss such friends.

For all my dear friends

Sunday, March 21, 2010

A Program to find the grade of a student in C++


main()
{
 struct student
 {
  int reg_no,m1,m2,m3,total,avg;
  char *name;
 }stud[10];
 int i;
 clrscr();
 for(i=1;i<=1;i++)
 {
  cout<<"\nENTER THE REG_NO,NAME,M1,M2,M3 : ";
  cin>>stud[i].reg_no>>stud[i].name>>stud[i].m1>>stud[i].m2>>stud[i].m3;
 }
 for(i=1;i<=1;i++)
 {
  cout<<"\n REG_NO  : "<<<"\n NAME    : "<<<"\n M1      : "<<<"\n M2      : "<<<"\n M3      : "<
  stud[i].total = stud[i].m1+stud[i].m2+stud[i].m3;
  stud[i].avg = stud[i].total/3;
  cout<<"\n TOTAL   : "<<<"\n AVERAGE : "<
  if((stud[i].m1<50 || stud[i].m2<50 || stud[i].m3<50))
  {
   cout<<"\n RESULT  : FAIL"<
  }
  else
  {
   cout<<"\n RESULT  : PASS"<
  }
  if(stud[i].avg>90)
  {
   cout<<"\n GRADE   : OUTSTANDING";
  }
  else if(stud[i].avg>75 && stud[i].avg <90)
  {
   cout<<"\n GRADE   : FIRST CLASS";
  }
  else if(stud[i].avg>60 && stud[i].avg<75)
  {
   cout<<"\n GRADE   : SECOND CLASS";
  }
  else if(stud[i].avg>50 && stud[i].avg<60)
  {
   cout<<"\n GRADE   : THIRD CLASS";
  }
  else
  {
   cout<<"\n GRADE   : NIL";
  }
 }
 getch();
 return 0;
}

Name of this program - SACHIN. To find the batsman details such as strike rate, average etc etc

main()
{
 long runs[10],inn[10],not_out[10],tot[10],ball[10];
 long double avg[10];
 long double strk[10];
 char name[10][10];
 clrscr();
 cout<<"\n~~~~~~~~~~~~~~~ENTER THE DETAILS OF THE PLAYERS~~~~~~~~~~~~~~";
 for(int i=1;i<=1;i++)
 {
  cout<<"\n ENTER THE NAME : ";
  cin>>name[i];
  cout<<"\n NO OF MATCHES PLAYED : ";
  cin>>inn[i];
  cout<<"\n ENTER THE TOTAL RUNS SCORED : ";
  cin>>runs[i];
  cout<<"\n NUMBER OF BALLS FACED : ";
  cin>>ball[i];
  cout<<"\n NO OF TIMES NOT OUT : ";
  cin>>not_out[i];
 }
 for(i=1;i<=1;i++)
 {
  tot[i]  = inn[i]-not_out[i];
  if(inn[i]==not_out[i])
  {
   avg[i] = runs[i];
  }
  else
  {
   avg[i]  = runs[i]/tot[i];
  }
   strk[i] = (runs[i]*100)/ball[i];
  }
 for(i=1;i<=1;i++)
 {
  cout<<"\n NAMES"<<"   INNINGS"<<"       RUNS"<<"       NOT OUT"<<"      AVG"<<"      STRIKE RATE";
  cout<<"\n"<<<"\t     "<<<"\t"<<<"\t     "<<<"\t"<<<"\t   "<
 }
  getch();
  return 0;
}

A C++ PROGRAM TO FIND WHEHTHER THE GIVEN NUMBER IS PRIME OR NOT

void main()
{
 clrscr();
 int num,i,c;
 cout<<"PROGRAM TO FIND THE PRIME NUMBER";
 cout<<"\nENTER THE NUMBER : ";
 cin>>num;
 if(num==1)
 {
  cout<<"THE GIVEN NUMBER IS A PRIME NUMBER";
 }

 for(i=2;i<=num-1;i++)
 {
  if(num%i == 0)
  {
   cout<<"THE GIVEN NUMBER IS NOT A PRIME NUMBER";
   break;
  }
 }
  if(i==num)
  {
   cout<<"THE GIVEN NUMBER IS A PRIME NUMBER";
  }
 getch();
}

A PROGRAM TO FIND THE BIGGER NUMBER OF THE GIVEN SERIES

void main()
{
 int i,n,a[150],max;
 clrscr();
 cout<<"ENTER THE LIMIT : ";
 cin>>n;
 cout<<"ENTER THE ELEMENTS : ";
 for(i=1;i<=n;i++)
 {
  cin>>a[i];
 }
 max = a[1];
 for(i=1;i<=n;i++)
  {
   if(a[i]>max)
   {
    max = a[i];
   }
  }
  cout<<"\nTHE BIGGEST NUMBER IS : "<<
  getch();
}

A C++ PROGRAM TO COMPARE TWO STRINGS WITHOUT USING strcmp() FUNCTION

main()
{
 clrscr();
 char a[25],b[25];
 int cnt=1,i=1;
 cout<<"\n ENTER THE STRING 1 : ";
 cin>>a;
 cout<<"\n ENTER THE STRING 2 : ";
 cin>>b;

 while(a[i]!='\0' && b[i]!='\0')
 {
  if(a[i]==b[i])
  {
   cnt++;
  }
  else
  {
   cout<<"\n\n THE TWO STRINGS ARE NOT EQUAL";
  }
  i++;
 }

 if(i==cnt)
 {
  int n;
  clrscr();
  cout<<"\n\n\t\t~~~~~~~~~~COMPARISON RESULT~~~~~~~~~~~";
  cout<<"\n\n THE GIVEN TWO STRINGS ARE ONE & SAME ";
 }

 getch();
 return 0;
}

Saturday, March 13, 2010

A C++ PROGRAM FOR FLAMES - A love GAME To Find whether your partner's relation is your Friend or Love Or Affection or Marriage Or Enemy Or Sister



include
#include
#include
#include
void main()
{
 char a[100],b[100],m='#',n='#',o='\0';
 int i=0,j=0,size,k;
 int cnt=0,cnt1=0;
 char *r,flag='y';
 clrscr();
 while(flag == 'y' || flag=='Y')
 {
 cout<<"\n\t DILLU IRUNDHA TRY PANNU MA..!!! ";
 cout<<"\n ENTER YOUR NAME  : ";
 cin>>a;

 cout<<"\n ENTER YOUR PARTNER'S NAME : ";
 cin>>b;

 size = (strlen(a)+strlen(b));

 for(i=0;a[i]!='\0';i++)
 {
  for(j=0;b[j]!='\0';j++)
  {
   if(a[i]==b[j])
   {
    size=size-2;
    break;
   }}}
 for(i=0;a[i]!='\0';i++)
 {
  for(j=i+1;a[j]!='\0';j++)
  {
   if(a[i]==a[j])
   {
    cnt = cnt+1;
    m = a[i];
   }}}
 for(i=0;b[i]!='\0';i++)
 {
  for(j=i+1;b[j]!='\0';j++)
  {
   if(b[i]==b[j])
   {
    cnt1 = cnt1+1;
    n = b[i];
   }}}
 for(i=0;b[i]!='\0';i++)
 {
  if(b[i] == m)
  {
   o=b[i];
  }}

 //cout<<"\n"<<<"\n"<<<"\n"<<
 //cout<<<<<"\n"<

 if(cnt == cnt1-1)
 {
  size = size;
 }

 else if(m!=n && cnt==0 && cnt1==1)
 {
  size = size;
 }

 else if(cnt==cnt1 && m==n)
 {
  size = size;
 }

 else if(cnt == cnt1 && m!=n && m==o)
 {
  size = size+2;
 }

 else if((cnt1 == cnt-2 || cnt == cnt1-2) && m==n && n!=o)
 {
  size = size+2;
 }

 else if(m!=n && cnt==0 && cnt1==0)
 {
  size = size;
 }

 else if(cnt == cnt-1 && m==n)
 {
  size = size;
 }

 else if(cnt%2!=0 && cnt1%2!=0 && m==n && m!=o)
 {
  size = size+2;
 }

 else if(cnt%2!=0 && cnt1%2!=0 && m!=n && cnt1!=1)
 {
  size = size+2;
 }

 else if(cnt1 == cnt-2 && m!=n && o==m)
 {
  size = size+4;
 }

 else if(m==n && cnt%2!=0 && cnt1%2!=0 && m!=o)
 {
  size = size;
 }

 else if(m==n && cnt1%2!=0 && o==m && cnt%2!=0)
 {
  size = size+9;
 }
  else if(m==n && n==o && cnt==cnt1/2)
 {
  size = size;
 }

 else
 {
  for(i=0;a[i]!='\0';i++)
  {
   for(j=1;a[j]!='\0';j++)
   {
    if(a[i]==a[j])
    {
     if(b[i] == a[i])
     {
      size = size+2;
      break;
     }}}}}

 switch(size)
 {
  case 1 :
  cout<<"\n\t ***~~~NO SPECIAL RELATION BETWEEN YOU AND YOUR PARTNER~~~***\n\t\t\t    !!! SORRY!!!";
  break;
  case 2 :
  r="E";
  break;
  case 3 :
  r="F";
  break;
  case 4 :
  r ="E";
  break;
  case 5 :
  r = "F";
  break;
  case 6 :
  r = "M";
  break;
  case 7 :
  r = "E";
  break;
  case 8 :
  r = "A";
  break;
  case 9 :
  r = "E";
  break;
  case 10 :
  r = "L";
  break;
  case 11 :
  r = "M";
  break;
  case 12 :
  r = "A";
  break;
  case 13 :
  r = "A";
  break;
  case 14 :
  r = "F";
  break;
  case 15 :
  r = "M";
  break;
  case 16 :
  r = "F";
  break;
  case 17 :
  r = "A";
  break;
  case 18 :
  r = "F";
  break;
  case 19 :
  r = "L";
  break;
  case 20 :
  r = "E";
  break;
  case 21:
  r = "F";
  break;
  case 22:
  r = "E";
  break;
  default :
  cout<<"\n\t ~~~ EVERYTHING IS BETWEEN YOU AND YOUR PARTNER ~~~ ";
  break;
 }
 cout<<"\n THE REMAINING CHARACTER IS '"<<<"' SO,";
 if(*r=='F')
 {
  cout<<"\n\n\t !!!!!!!! YOU BOTH ARE GOOD FRIENDS !!!!!!!!";
 }
 else if(*r=='L')
 {
  cout<<"\n\n\t !!!!!!@!!!!!! YOU BOTH ARE LOVERS !!!!!!@!!!!!!";
 }
 else if(*r=='M')
 {
  cout<<"\n\n\t !!!!!!!! YOU BOTH WILL MARRY EACH OTHER !!!!\b!!!!";
  cout<<"\n\n WARNING : DONT TRY TO MARRY IF YOU BOTH ARE SAME GENDER";
 }
 else if(*r=='A')
 {
  cout<<"\n\n\t ###### YOU BOTH HAVE MORE AFFECTION ON EACH OTHER ######";
 }
 else if(*r=='E')
 {
  cout<<"\n\n\t ****** YOU BOTH ARE ENEMIES ******";
 }
 else if(*r=='S')
 {
  cout<<"\n\n\t $$$$$$ SHE IS YOUR SISTER.IF THE PARTNER IS MALE THEN HE IS YOUR BROTHER $$$$$$";
 }
 /*else
 {
   cout<<"\n\n\t &&&&&& YOU ARE LIKE EVERYTHING TO HER &&&&&&";
 }*/
 cout<<"\n DO YOU WANT TO TEST AGAIN (Y/N) : ";
 flag = getch();
 clrscr();
}
}

Sunday, March 7, 2010

C PROGRAM TO PRINT DIAMOND USING LOOPS

main()
{
 int m=3,i,j,k,n=1;
 clrscr();
 for(i=1;i<=5;i++)
 {
  for(k=1;k<=m;k++)
  {
   printf(" ");
  }
  for(j=1;j<=n;j++)
  {
   printf("* ");
  }
   printf("\n");
   if(i>=3)
   {
    m=m+1;
    n=n-1;
   }
   else
   {
    m=m-1;
    n=n+1;
   }
 }
 getch();
 return 0;
}

A C++ Program for Division Of Complex Numbers(a+ib)/(c+jd)

**********(a+ib)/(c+jd) ***********
void main()
{
 float a,b,c,d;
 float x,y;
 clrscr();
 cout<<"\n ENTER THE REAL AND IMAGINARY PART OF 1ST COMPLEX NUMBER : ";
 cin>>a>>b;
 cout<<"\n ENTER THE REAL AND IMAGINARY PART OF 2ND COMPLEX NUMBER : ";
 cin>>c>>d;
 cout<<"\n\n THE RESULT IS : ";
 if(a==0 && b==0 && c==0 && d==0)
 {
  x=0;
  y=0;
  cout<<<"+i"<
 }

 if(d>0 && b>0 && d!=b && a!=c)
 {
  x = ((a*c)+(b*d))/((c*c)+(d*d));
  y = ((a*d)-(b*c))/((c*c)+(d*d));
  if(y>0)
  {
  cout<<<"+i"<
  }
  else if(y<0)
  {
   cout<<<"-i"<<(-y);
  }
 }
 else if(d<0 && b>0)
 {
  x = ((a*c)-(b*d))/((c*c)+(d*d));
  y = ((a*d)+(b*c))/((c*c)+(d*d));
  if(y<0)
  {
   cout<<<"-i"<<(-y);
  }
  else
  {
   cout<<<"+i"<
  }
 }
 else if(b<0 && d>0)
 {
  x = ((a*c)-(b*d))/((c*c)+(d*d));
  y = ((a*d)+(b*c))/((c*c)+(d*d));
  if(y<0)
  {
   cout<<<"+i"<<(-y);
  }
  else
  {
   cout<<<"-i"<
  }
 }
 else if(b<0 && d<0)
 {
  x = ((a*c)+(b*d))/((c*c)+(d*d));
  y = ((a*d)-(b*c))/((c*c)+(d*d));
  if(y<0)
  {
   cout<<<"-i"<<(-y);
  }
  else
  {
   cout<<<"+i"<
  }
 }
 else if(a==c && b==d)
 {
  cout<<"1";
 }
 getch();
 return;
}

C++ PROGRAM TO CALCULATE THE ELECTRICITY BILL

main()
{
 char name[100],flag = 'y';
 int no_unit;
 double rs;
 float rate1=0,rate2=0,rate3=0;
 clrscr();
 while(flag == 'y' || flag == 'Y')
 {
  clrscr();
  cout<<"\n\t\t ********** C-PROGRAM FOR ELECTRICITY BILL **********";
  cout<<"\n ENTER THE NAME : ";
  cin>>name;
  cout<<"\n ENTER THE NUMBER OF UNITS : ";
  cin>>no_unit;
  if(no_unit>300)
  {
   for(int i=1;i<=100;i++)
   {
    rate1 = i * 0.60;
   }
   for(i=100;i<=300;i++)
   {
    rate2 = i * 0.80;
   }
   for(i=300;i<=no_unit;i++)
   {
    rate3 = i * 0.90;
   }
 }
 else if(no_unit<300 && no_unit>100)
 {
   for(int i=1;i<=100;i++)
   {
    rate1 = i * 0.60;
   }
   for(i=100;i<=no_unit;i++)
   {
    rate2 = i * 0.80;
   }
 }
 else if(no_unit<=100)
 {
  for(int i=1;i<=no_unit;i++)
  {
   rate1 = i * 0.60;
  }
 }
 double rate = rate1+rate2+rate3;
 if(rate<50)
 {
  rate = 50.00;
 }
 else if(rate>300)
 {
  float add = rate * 0.15;
  rate = rate+add;
 }
 clrscr();
 cout<<"\n\n\t THE USER NAME IS     : "<
 cout<<"\n\n\t NO.OF UNITS CONSUMED : "<
 cout<<"\n\n\t TOTAL BILL IS        : Rs."<<<" Ps";
 cout<<"\n\n FOR ANOTHER BILL PRESS Y or y : ";
 flag = getch();
}
 return 0;
}

C++ PROGRAM TO INTERCHANGE TWO VALUES WITHOUT USING THE THIRD VARIABLE..

void main(){
 int x,y;
 clrscr();
 cout<<"ENTER THE VALUES OF X AND Y :";
 cin>>x>>y;
 cout<<"BEFORE CHANGING";
 cout<<"\n X = "<<<"\n Y = "<<
 cout<<"AFTER CHANGING";
 x=x+y;
 y=x-y;
 x=x-y;
 cout<<"\n X = "<<<"\n Y = "<<
 getch();
}

********* C++ - PROGRAM FOR BANKING *********

class bnkacct
{
 private:
  char name[50];
  long ac_no;
  char ac_type[50];
  long amt,t_amt;
  long bal;
 public:
  void getin()
  {
   cout<<"\n ENTER THE NAME : ";
   cin>>name;
   cout<<"\n ENTER THE ACCOUNT NUMBER : ";
   cin>>ac_no;
   cout<<"\n ENTER THE TYPE OF THE ACCOUNT : ";
   cin>>ac_type;
  }
  void deposit()
  {
   cout<<"\n ENTER THE AMOUNT THAT YOU ARE GOING TO DEPOSIT : ";
   cin>>t_amt;
   bal = t_amt;
  }
  void withdraw()
  {
   cout<<"\n ENTER THE AMOUNT TO BE WITHDRAWN : ";
   cin>>amt;
   if(amt<=t_amt)
   {
    t_amt = t_amt-amt;
    cout<<"\n AMOUNT  : "<<<"Rs";
    cout<<"\n BALANCE : "<<<"Rs";
   }
   else
   {
    cout<<"\n UNAVIALABLE BALANCE";
   }
  }
  void display()
  {
   cout<<"\n\n\n NAME     : "<
   cout<<"\n ACC_TYPE : "<
   cout<<"\n BALANCE  : "<
  }
 };
main()
{
 clrscr();
 bnkacct s;
 cout<<"\n\t\t ********* C-PROGRAM FOR BANKING ********* ";
 s.getin();
 s.deposit();
 s.withdraw();
 s.display();
 getch();
 return 0;
}

HOW TO PRINT NUMBER OF VOWELS IN A STRING USING C PROGRAM


main()
{
 char c;
 int count = 0;
 clrscr();
 cout<<"\nENTER THE STRING(~ TO TERMINATE) : ";
 do
 {
  c=getchar();
  if( (c=='A' || c=='a') || (c=='E' || c=='e') || (c=='I'|| c=='i') || (c=='O' || c=='o') || (c=='U' || c=='u'))
  {
   count++;
  }
 }while(c!='~');
 cout<<"THE NUMBER OF VOWELS PRESENT IS : "<<<"\n";
 getch();
 return 0;
}

BEST WAY TO WRITE C PROGRAM TO PRINT NUMBER SERIES

#include
#include
void main()
{
 int num,i,j,count;
 char flag='y';
 clrscr();

 while(flag == 'y' || flag == 'Y')
 {
  clrscr();
  cout<<"\n ENTER THE LIMIT : ";
  cin>>num;
  cout<<"\n THE PRIME NUMBER SERIES IS : ";
  printf("\n 1 \n 2 \n 3 \n");

 for(i=4;i<=num;i++)
 {
  count=2;
  for(j = 2;j < i; j++)
  {
   if(i%j != 0)
   {
    count = count+1;
   }
  }
   if(j == count)
    {
     printf(" %d \n",i);
    }
 }
  printf("\n DO YOU WANT PRINT ANOTHER SERIES (Y/N) : ");
  flag = getch();
 }
}

VOTING IN ELECTION CONCEPT - C++ PROGRAM

#include
#include
#include
#include
#include
#include
 

main()
{
 clrscr();
 char name[6][100] = {"GOVERNER'S RULE","Mr.VIJAYAKANTH","Mr.KARUNANITHI","Ms.J.JAYA","Mr.SARATH","Mr.VIJAY"};
 int i,j;
 int v0=0,v1=0,v2=0,v3=0,v4=0,v5=0,v8=0;
 char flag='y';

 while(flag == 'y' || flag == 'Y')
 {
  clrscr();
  cout<<"\n\tNAMES OF THE CANDITATES";
  for(i=0;i<=5;i++)
 {
  cout<<"\n"<<<"."<
 }
 cout<<"\nIF VOTING IS OVER PRESS '6' TO SEE THE RESULT";
 cout<<"\nENTER YOUR BEST CHOICE : ";
 cin>>j;
 switch(j)
 {
  case 0:
  {
   v0++;
   break;
  }
  case 1:
  {
   v1++;
   break;
  }
  case 2:
  {
   v2++;
  break;
  }
  case 3:
  {
   v3++;
   break;
  }
  case 4:
  {
   v4++;
   break;
  }
  case 5:
  {
   v5++;
   break;
  }
  case 6:
  {
   clrscr();
   cout<<"\n~~~~~~~~~~~~~~~THE DETAILS OF THE ELECTION~~~~~~~~~~~~~~~~~\n";
   cout<<"\n\t GOVERNER'S RULE : "<
   cout<<"\n\t VIJAYAKANTH    : "<
   cout<<"\n\t J.JAYA         : "<
   cout<<"\n\t KARUNANITHI    : "<
   cout<<"\n\t SARATH         : "<
   cout<<"\n\t VIJAY          : "<
   cout<<"\n\t SPOILT VOTES   : "<
   if(v0>(v1 && v2 && v3 && v4 && v5))
   {
    cout<<"\n\t NOBODY WINS THE ELECTION!";
    cout<<"\n\t THE RULE STRAIGHT A WAY GOES TO THE HANDS OF GOVERNOR";
   }
   else if(v1>v2 && v1>v3 && v1>v4 && v1>v5)
   {
    cout<<"\n\t VIJAYAKANTH WINS THE ELECTION!";
   }
   else if(v2>v1 && v2>v3 && v2>v4 && v2>v5)
   {
    cout<<"\n\t J.JAYA WINS THE ELECTION!";
   }
   else if(v3>v1 && v3>v2 && v3>v4 && v3>v5)
   {
    cout<<"\n\t KARUNANITHI WINS THE ELECTION!";
   }
   else if(v4>v1 && v4>v2 && v4>v3 && v4>v5)
   {
    cout<<"\n\t SARATH WINS THE ELECTION!";
   }
   else if(v5>v1 && v5>v2 && v5>v3 && v5>v4)
   {
    cout<<"\n\t VIJAY WINS THE ELECTION!";
   }
   else if(v1==0 && v2==0 && v3==0 && v4==0 && v5==0)
   {
    cout<<"\n\t NO VOTERS IDENTIFIED!";
   }
   else if((v1==v2) && (v1==v3) && (v3==v4) && (v4==v5))
   {
    cout<<"\n\t NO MAJORITY FOR ANY CANDIDATES!";
   }
   break;
  }
  default:
  {
   v8++;
  }
  }
  cout<<"\nTO CONTINUE VOTING,PRESS (Y) OR (y) : ";
  flag = getch();
}
 return 0;
}

HOW TO QUIT DRINKING





  1. Talk to your doctor. If you chose not to, bear in mind that alcohol withdrawal can potentially be deadly. If you start experiencing severe withdrawal symptoms (panic attacks, severe anxiety pressure you should seek immediate medical assistance. The condition could potentially deteriorate to deadly delerium tremens if left untreated.

  2. Change your attitude about quitting! Remember, you're not being forced to give up a good friend who has treated you well. Instead, you are finally ridding yourself of an awful enemy who has robbed you of many great pleasures in life
  3. Constantly remind yourself of what a great thing you are doing and hold tightly to your quit. Remember that you are pardoning yourself from a life sentence in the prison of alcoholism and you will always hold the key.
  4. Try to pick some significant date to quit. Be ambitious, but reasonable. If you are very heavy drinker you must first slow down to avoid withdrawal symptoms (in this case it is best to have your doctor help you plan your quitting date).
  5. Get rid of all bottles, cans, etc.
  6. Revise recipes that call for wine so you do not have it in the kitchen.
  7. Buy a wallet and whenever you think about buying a bottle or a drink, put that amount of money in your sober wallet. It will shock you. Use this for healthier stress relief: massage, visit to a day spa, yoga class...
  8. Buy a small piece of inexpensive jewellery like a ring or bracelet, or henna your hand, or get a special manicure to remind you that these hands no longer buy or touch alcohol.
  9. Drink a lot of water.
  10. Consider joining a support group like Alcoholics Anonymous. These groups have helped millions of people to quit. There are also secular support groups as well such as SMART Recovery and LIFERING.
  11. Never take another sip.
  12. Don't try to explain quitting or trying to quit to people -- if they themselves are not in this situation, they are unable to fathom what you're trying to do. Many people will try to enable you and convince you to drink so they can feel better about their own addiction.
  13. Admit to yourself, and remember it, that there is absolutely nothing in your life more important than this one thing.
  14. Do not avoid all situations where you would normally drink. Instead approach them with a good attitude and remember that you can have a good time without drinking.
  15. Memorize a prayer, poem or something (i.e. Hamlet's speech "To be or not to be") to repeat to yourself when you are losing your mind; trying to remember it will keep your head together sometimes.
  16. Give yourself a prize for every day or every hour that you haven't had a drink.
  17. Talk to your doctor. If you chose not to, bear in mind that alcohol withdrawal can potentially be DEADLY. If you start experiencing withdrawal symptoms such as severe anxiety or elevated blood pressure you should seek immediate medical assistance before the condition deteriorates to delerium tremens.
  18. "He who conquers others is mighty. He who conquers himself is almighty."
  19. "Pick up yoga! It will help you deal with stress and calm your mind."
  20. Take a B-vitamin supplement daily for your first week off alcohol. Alcohol affects the ability of the body to absorb these (specifically thiamine). Deficiency can cause severe cognitive impairment (Wernicke-Korsakoff syndrome or wet brain).
  21. If you are tempted, try to visualize what you might look like totally out of control. Do you really want to be that person again?
  22. If you are a scheduled drinker, like after work or when you go home, change your routine to involve another activity like visiting your parents or a friend.
  23. Have food before you drink,this will reduce your interest for drinking


KERALA TO SEE

Alleppey
The town was founded by Raja Keshawadasan, Divan of Travanacore in 1762. With the arabian sea on the west and a vast network of lakes, lagoons and fresh water rivers crisscrossing it, alappuzha is a district of immense natural beauty



Cochin
A leisurely walk through the city is the best way to discover historic Fort Kochi. An obscure fishing village that became the first European township in India, Kochi has an eventful and colourful history.


Calicut
Once the capital of the powerful Zamorins and a prominent trade and commerce centre, Kozhikode was the most important region of Malabar in the days gone


Idukki
This is the world's second and Asia's first arch dam, constructed across the Kuravan and Kurathi hills.


Kannur
With the Lakshadweep sea in the west, the Western Ghats in the east, and the Kozhikode and Wayanad districts in the south, Kannur is bounded


Kasaragod
The northern most district of Kerala, Kasaragod is situated on the sea coast bordered by hilly Kodagu and Mangalore districts of Karnataka in the east and north.


Kollam
This seaside village of historic importance has the ruins of an old Portuguese fort and churches built in the 18th century.


Munnar
Munnar is situated at the confluence of three mountain streams - Mudrapuzha, Nallathanni and Kundala. 1600 m above sea level


Palakkad
Palakkad Fort: The old granite fort situated in the very heart of Palakkad town is one of the best preserved in Kerala. It was built by Hyder Ali of Mysore in 1766.


Thekaddy
The very sound of the word Thekkady conjures up images of elephants, unending chains of hills and spice scented plantations.


Trichur
Tiruchirappalli is situated on the banks of the River Kaveri. It is 320 kms. from Madras. This city was a Chola citadel during the Sangam Age.


Trivandrum
The capital of the state of Kerala, Thiruvananthapuram or the City of the Sacred Snake, is built over seven hills. Named after Anantha


Wayanad
Thirunelly temple (32 km northeast of Mananthavady): Surrounded by Kambamala, Karimala and Varadiga, the Thirunelly temple is a marvel of temple architecture.

Saturday, March 6, 2010

Stop smoking plan (START)


S = Set a quit date.
 
T = Tell family, friends, and co-workers that you plan to quit.

A = Anticipate and plan for the challenges you'll face while quitting.

R = Remove cigarettes and other tobacco products from your home, car, and work.

T = Talk to your doctor about getting help to quit.

10 Fire Precautions At Your Sweet Home

 1. Protect Your Belongings
Except when you actually need them elsewhere, keep your most important papers and possessions in a Fire proof safe. Make an inventory of your valuables, and store that list, along with photos of the items, in the safe itself.| 


2. Inspect Your Home for Fire Hazards
Check with your local fire department's fire prevention unit to see if they conduct home inspections. If you do it yourself, look for hazards around the kitchen, the fireplace, the furnace, electrical wiring, switches and outlets. Place all combustible items at least three (3) feet from any heat source.
Unattended cooking is the #1 cause of fire. Watch what you heat, wear short or tight fitting sleeves when cooking and keep pot handles turned in toward the stove. If food catches fire, extinguish flames by sliding a lid over the fire, and turning off the burner. 


3. Plan and Practice a Fire Escape Plan
Draw a diagram of your home and plan two (2) escape routes from every room. Pick a place to meet after you escape. A good meeting place is a tree or telephone pole in front of your home. Make sure you can easily open all windows and exit doors. Practice your plan every six months.

4. Install Smoke Detectors and Make Sure They Work
Install a detector near each sleeping area, either on the ceiling or high on a wall. Test each unit by following the manufacturer's suggestions. Check batteries once a month by pushing the unit's test button. Change batteries at least once a year. Many people change their batteries when they change their clock settings in the Spring and Fall. 


5. Use Common Sense if You Smoke
Smoking is by far the leading cause of fatal home fires. Never smoke in bed, or while drowsy. Make sure all smoking materials are extinguished before you put them in the trash. Use large deep ashtrays and make sure ashes and smoking materials are completely cooled before discarding. Check in and around furniture cushions for stray smoking materials before going to bed or leaving home. Keep matches and lighters out of sight and reach of children. 


6. Sleep With the Bedroom Doors Closed
The majority of fatal fires happen between 10 p.m. and 6 a.m. Closed bedroom doors can deter smoke from spreading, and give you more time to escape. Make sure everyone in the house can hear the smoke alarm from inside the closed bedroom, or consider installing an alarm inside the bedroom as well. 


7. Get Out Fast, and Stay Out!
If fire breaks out, you'll have only minutes to escape with your life. Focus all your attention on getting out and don't try to save possessions. Never go back into a burning building. It's often a fatal mistake. 


8. Feel Doors Before Opening Them
Be sure to touch the door, the door knob, and crack next to the door with the back of your hand. If you feel heat, don't open the door. Use your second way out. Even if the door is cool, brace your shoulder against the door and open it carefully. 


9. Crawl Low Under Smoke
Smoke actually kills more people than fire does. If you see smoke, use your second way out. If you must go through a smoke-filled area to get out, get down on your hands and knees, and crawl quickly under the smoke to the exit. 


10. Stop, Drop and Roll, if Your Clothes Catch Fire
Don't run. Stop, drop to the floor and cover your face with your hands. Roll over and over until the fire goes out, or if physically unable to stop, drop and roll, smother flames with a coat or blanket. 


Thanks for reading... eeeeeeeeeee

What you will do.....????

It has been found that Mayan is the first civilzed people in this world and they hace told that the world will end on 21.12.2012. They call it as the DOOMSDAY. They says it is the day of god returns. Scientists have predicted that earth's magnetic pole will change and earthquake and tsunami results in end of this world.
We all people have different emotions and feelings which we never expose. So I need all of you to say something on this

If it really happens what you will like to do at the last moment?
I need all of you to reply for this......

WAR and STARVING

When the developed nations fight to rule the world, to become the most powerful, to give the most beautiful to teir people,  thousands of men dies. At the same time several thousands of people die without food. Many eats rat, even clay atleast to hold their breathe for one more day.

                             When those nations can develop such a missile to destroy te place which is thousands of miles away, why dont they send a missile with full of foods, chocolates, bread that burst in the air and gives food to all under poverty. This world is common to everyone but still we fight even for a glass of water.


         There is no need of an axe to pluck a flower.

I need all of you who watches my blog to take an oath that

We should never fight even with our neighbours.
All people are our relations and EARTH is our home.
Help as much as you can.
Make everything common.
There is no caste created by god.

Join me to keep the World Green


Some of the ways I follow To Keep This World Green

1. I never write anything in paper unless its really worth. E.xcept my exams.
2. I stopped using tissue paper to wipe my hands and face after a wash. I always use my Hanky.
3. I keep the daily newspaper very safe and give it back for recycling.
4. I Always use the same plastic cover for many days as i can. If it mixes in water or land everything will get effected.
5. I dont tear any paper into pieces unless it is so confidential.
6. Stopped Burning paper for any cost.
7. I always use public vehicle.
8. I want all of you to check your vehicles emission atleast once in a month.
9. Dont accelerate your vehicle much in signals, traffic. Turning it off is better.
10. Keep all your papers very safe from toda and give it back for recycling.

Thanks a million
kailash

TOP 7 WORDS FOR The Little Master


1 Ball - Likes to destroy always
2 Sad Moments - What he gives to the bowlers
3 Sad About - Retirement
4 Happiness - Gives to his fans
5 Century - Ponting worries
6 Age - Never increase
7 World Records - Never ends

There is a famous saying that "Commit your Crimes while SACHIN is batting. Because Even God would be watching him at that time"

Am a great of Sachin Tendulkar!!!!!
What about you.?

Friday, March 5, 2010

Best Dialogue in the film "TROY"


If they ever tell my story...
... I walked with giants
Men Rise and Fall like the Winter Wheat
but these names will never die..

Let them say i lived in the time of Hector..
..Breaker of Horses...!

Let them say....
i lived in the times of Troy

Let them say..
i lived in the time of Achilies....!

- watch this in film to feel the real feeling of a young warrior dying at the war land!