Wednesday, November 28, 2012

Quiz game in C language complete source code download


C language is the basic language in the programming field. every programmer starts the programming from the C language. Generally in the IT field like Computer Engineerung or any related computer field, we are taught the C language and at the end of the class, we are asked to do a simple project  implementing C language. At this situation we may be in delime about what to do in the project as C project.In that particular condition  The Quiz game can be one of the alternative to us. It implemts almost every part we learn in the course from simple input/output to the file implementation.

INTRODUCTION

Quiz game is a very popular General Knowledge Game. The quiz game increases the IQ knowledge of the player. It is used to check the knowledge within us.
The provided source code is the simple Quiz game programmed  implementing C language. In this programe The several question are provided  to the player.The player are provided with 4 option in it. Player is all need to choice the suitable option from the 4 option available in the screen. The player need to type either A,B,C,or D according to the suitable answer provided in it.
The player will score the points with each correct answer provided. If the player is unable to answer the question, then correct answer is provided. The user are given 3 chance in it. The game will be terminated with score and suggestion displayed if the user goes to incorrect answer for consequitive 3 chances.

At the beginning of the game menu is provided .according to the menu user need to proceed in it. Also File is used in it to store the points scored by the player. The player can see the highest score through this file through the menu .
24 question are included in it,however we can add further question as per our need.


DOWNLOAD SOURCECODE WITH OUTPUT HERE

I hope this article will be helpful in the project regarding  the C programming project. The quiz program is really intresting project to begin programming project for the beginners. The code is simple and clean.  I appreciate the comment and any feedback ,Please.

Thursday, November 22, 2012

Tiger and Goat(Baghchal) game-Artificial Intelligence game sourcecode in c++


 Introduction:

Baghchaal is a Typical Nepali game.It is also called tiger and goat game. The main aim of this game is that the tigers tries to eat the goat as more as it can whereas the goat tries to trap the tiger to its moveless position.
baghchaal board





RULES

At the start of the game, all four tigers are placed at the four edge of the board facing the center of the grid.Then the goat needs to be placed in the grid turn by turn alternately with the tiger.

The goat must be placed at the intersection of the board and follow the lines.There are 20 goats available  in this game.once the 20 goats are placed in the grid. Then the move should be made from the placed goat in the grid.

The tiger captures the goat by jumping over them to an adjacent free position.


Sourcecode detail:

game:   tiger and goat(baghchaal)
language:  visual c++
IDE      : visual studio

The sourcecode available is a artificial intelligence game. The computer player is the tiger and the user is goat. Here the image used are wasp as tiger and butterfly as goat.
The user can handle the butterfly with the use of mouse. The user just need to point the goat and drag to the desire place.


OUTPUT:




download sourcecode here
















Wednesday, November 21, 2012

MINOR PROJECT tic -tac-toe with artificial intelligence sourcecode in c++ download

Tic-tac-toe is a simple two player game. It is a pen and paper game.It is mostly played especially in childhood between two player. each player tries to complete the boxes horizontally,vertically or diagonally. The player to finished first is declared the winner.


This game can be of several form with AI or without AI. Here the mentiioned code is the game with artificial intelligence. The human player can play against the computer player. and the code given to download is in C++


DOWNLOAD SOURCECODE HERE

Tic-tac- toe game sourcecode in C

INTRODUCTION

Tic-tac-toe is a simple two player game. It is a pen and paper game.It is mostly played especially in childhood between two player. each player tries to complete the boxes horizontally,vertically or diagonally. The player to finished first is declared the winner.

This is a simple  game without the AI(artificial intelligence). This code doesnot contain the AI i.e player cannot play against the computer player.


HERE IS THE COMPLETE CODE:

/* This is the complete source code of tic tac toe in C language. It is perfectly run in the codeblocks IDE */

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include <windows.h>



int board[10] = {2,2,2,2,2,2,2,2,2,2};
int turn = 1,flag = 0;
int player,comp;

void menu();
void go(int n);
void start_game();
void check_draw();
void draw_board();
void player_first();
void put_X_O(char ch,int pos);
 COORD coord={0,0}; // this is global variable
                                    //center of axis is set to the top left cornor of the screen
void gotoxy(int x,int y)
{
    coord.X=x;
    coord.Y=y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}



 void main()
{
 system("cls");
 menu();
 getch();

}

void menu()
{
 int choice;
 system("cls");
 printf("\n--------MENU--------");
 printf("\n1 : Play with X");
 printf("\n2 : Play with O");
 printf("\n3 : Exit");
 printf("\nEnter your choice:>");
 scanf("%d",&choice);
 turn = 1;
 switch (choice)
 {
  case 1:
   player = 1;
   comp = 0;
   player_first();
   break;
  case 2:
   player = 0;
   comp = 1;
   start_game();
   break;
  case 3:
   exit(1);
  default:
   menu();
 }
}

int make2()
{
 if(board[5] == 2)
  return 5;
 if(board[2] == 2)
  return 2;
 if(board[4] == 2)
  return 4;
 if(board[6] == 2)
  return 6;
 if(board[8] == 2)
  return 8;
 return 0;
}

int make4()
{
 if(board[1] == 2)
  return 1;
 if(board[3] == 2)
  return 3;
 if(board[7] == 2)
  return 7;
 if(board[9] == 2)
  return 9;
 return 0;
}

int posswin(int p)
{
// p==1 then X   p==0  then  O
 int i;
 int check_val,pos;

 if(p == 1)
  check_val = 18;
 else
  check_val = 50;

 i = 1;
 while(i<=9)//row check
 {
  if(board[i] * board[i+1] * board[i+2] == check_val)
  {
   if(board[i] == 2)
    return i;
   if(board[i+1] == 2)
    return i+1;
   if(board[i+2] == 2)
    return i+2;
  }
  i+=3;
 }

 i = 1;
 while(i<=3)//column check
 {
  if(board[i] * board[i+3] * board[i+6] == check_val)
  {
   if(board[i] == 2)
    return i;
   if(board[i+3] == 2)
    return i+3;
   if(board[i+6] == 2)
    return i+6;
  }
  i++;
 }

 if(board[1] * board[5] * board[9] == check_val)
 {
  if(board[1] == 2)
   return 1;
  if(board[5] == 2)
   return 5;
  if(board[9] == 2)
   return 9;
 }

 if(board[3] * board[5] * board[7] == check_val)
 {
  if(board[3] == 2)
   return 3;
  if(board[5] == 2)
   return 5;
  if(board[7] == 2)
   return 7;
 }
 return 0;
}

void go(int n)
{
 if(turn % 2)
  board[n] = 3;
 else
  board[n] = 5;
 turn++;
}

void player_first()
{
 int pos;

 check_draw();
 draw_board();
 gotoxy(30,18);
 printf("Your Turn :> ");
 scanf("%d",&pos);

 if(board[pos] != 2)
  player_first();

 if(pos == posswin(player))
 {
  go(pos);
  draw_board();
  gotoxy(30,20);
  //textcolor(128+RED);
  printf("Player Wins");
  getch();
  exit(0);
 }

 go(pos);
 draw_board();
 start_game();
}

void start_game()
{
 // p==1 then X   p==0  then  O
 if(posswin(comp))
 {
  go(posswin(comp));
  flag = 1;
 }
 else
 if(posswin(player))
  go(posswin(player));
 else
 if(make2())
  go(make2());
 else
  go(make4());
 draw_board();

 if(flag)
 {
  gotoxy(30,20);
  //textcolor(128+RED);
  printf("Computer wins");
  getch();
 }
 else
  player_first();
}

void check_draw()
{
 if(turn > 9)
 {
  gotoxy(30,20);
  //textcolor(128+RED);
  printf("Game Draw");
  getch();
  exit(0);
 }
}

void draw_board()
{
 int j;

 for(j=9;j<17;j++)
 {
  gotoxy(35,j);
  printf("|       |");
 }
 gotoxy(28,11);
 printf("-----------------------");
 gotoxy(28,14);
 printf("-----------------------");

 for(j=1;j<10;j++)
 {
  if(board[j] == 3)
   put_X_O('X',j);
  else
  if(board[j] == 5)
   put_X_O('O',j);
 }
}

void put_X_O(char ch,int pos)
{
 int m;
 int x = 31, y = 10;

 m = pos;

 if(m > 3)
 {
  while(m > 3)
  {
   y += 3;
   m -= 3;
  }
 }
 if(pos % 3 == 0)
  x += 16;
 else
 {
  pos %= 3;
  pos--;
  while(pos)
  {
   x+=8;
   pos--;
  }
 }
 gotoxy(x,y);
 printf("%c",ch);
}



OUTPUT:

Sunday, November 4, 2012

Hostel Managment Database Project sourcecode in .Net free Download

Hostel  Management project is a Database project .It is coded under .net framework and the IDE used is Visual studio 2010 and the database used is SQL Server management studio 2008

To run the below code ,Note you must have install the visual studio 2010. and you should create the database yourself. The database is not provided here.



Dot and Box -AI based game sourcecode in C# download


                                            INTRODUCTION

Starting with an empty grid of dots, players take turns, adding a single horizontal or vertical line between two unjoined adjacent dots. A player who completes the fourth side of a 1×1 box earns one point and takes another turn. (The points are typically recorded by placing in the box an identifying mark of the player, such as an initial). The game ends when no more lines can be placed. The winner of the game is the player with the most points.
Dots and Boxes is a very simple game. Two players take turns drawing lines between dots on the game board. When a player draws a line that completes a box, the player "owns" that box. Whoever owns more boxes when the game board is full is the winner. The board can be of any size.


                                               METHODOLOGY


Regarding the language C# language will be used in the programming of dot and box game. Visual studio 2010 will be used as the IDE for the development of the project.
 Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop console and graphical user interface applications along with Windows


REFERENCES:
       







 Download the sourcecode and report here





Wednesday, June 27, 2012

Eight queen problem with solution in visual prolog (artificial intelligence)


Eight queens problem
Eight queens problem is a constraint satisfaction problem. The task is to place eight queens in the 64 available squares in such a way that no queen attacks each other. So the problem can be formulated with variables x1,x2,x3,x4,x5,x6,x7,x8 and y1,y2,y3,y4,y5,y6, y7,y8; the xs represent the rows and ys the column. Now a solution for this problem is to assign values for x and for y such that the constraint is satisfied.
The problem can be formulated as
P={(x1,y1),(x2,y2),……………………..(x8,y8)}
where (x1,y1) gives the position of the first queen and so on.

So it can be clearly seen that the domains for xi and yi are
Dx = {1,2,3,4,5,6,7,8}and Dy ={1,2,3,4,5,6,7,8} respectively.

The constraints are
i. No two queens should be in the same row,
i.e  yi≠yj for i=1 to 8;j=1 to 8;i≠j
ii. No two queens should be in the same column,
i.e  xi≠xj for i=1 to 8;j=1 to 8;i≠j
iii. There should not be two queens placed on the same diagonal line
i.e  (yi-yj) ≠ ±(xi-xj).

Now a solution to this problem is an instance of P wherein the above mentioned constraints are satisfied.

code in prolog

PREDICATES
DOMAINS
cell=c(integer, integer)
list=cell*
int_list=integer*

PREDICATES
solution(list)
member(integer,int_list)
nonattack(cell,list)

CLAUSES
solution([]).

solution([c(X,Y)|Others]):-
solution(Others),
member(Y,[1,2,3,4,5,6,7,8]),
nonattack(c(X,Y),Others).

nonattack(_,[]).
nonattack(c(X,Y),[c(X1,Y1)|Others]):-
Y<>Y1,
Y1-Y<>X1-X,
Y1-Y<>X-X1,
nonattack(c(X,Y),Others).

member(X,[X|_]).
member(X,[_|Z]):-
member(X,Z).


GOAL
solution([c(1,A),c(2,B),c(3,C),c(4,D),c(5,E),c(6,F),c(7,G),c(8,H)]).

Monday, June 25, 2012

How to start using google map API in android programming projects

Google map api is very impportant tool which we can use in our project.For the beginners it is quite important to know some of the terms and things which is important before starting Api .

Firstly ,before we use API in our programme we must have the API key.so we must generate the API key in the beginning and we should submit it to the google.after then it gives us some code which we should paste in our programme and we can get the nice google map in our screen.

STEPS FOR GENERATING KEY:


1.  first go to the command prompt.
2 <C:\program files \java \jdk1.6.0_21\bin> keytool -list -alias androiddebugkey -keystore debug.keystore
        -storepass android -keypass android
          note:  jdk1.6.0_21 is the jdk version installed in my computer ,you may have another one so be                      
                    careful .First check in your computer at the location C:\program files\java
  










3.Then the MD5 fingerprint code is generated.But if your jdk version is 1.7 then MD5 fingerprint is not generated but we need MD5 so put -v behind list to get the MD5 code


4 Then go to the Android Maps API Key Signup page enter the md5 fingerprint provided .Then the site will generate the code .place this code in your program to get the google map view.
       

Sunday, June 3, 2012

how to append two list in visual prolog programming


Visual Prolog Program to append two list.


Here the two list are taken by the predicate “append” and returns the appended list. To append two list a list is broken continuously until the last empty list is encountered and finally the other list is appended or joined at the end of first recursively. The code to append is given as follows:

DOMAINS
int_list=Integer *

PREDICATES
append(int_list,int_list,int_list)
CLAUSES

append([],X,Z):-
Z=X.
append([H|T],X,Y):-
append(T,X,Z),Y=[H|Z].
GOAL
append([1,2,3,4,5],[6,7,8,9],X).

how to find factorial in visual prolog programming


Visual Prolog Program to find the factorial of a number.




To find the factorial of a number in Visual Prolog, the number is decreased and the predicate “factorial” is continuously until a Zero is encountered when it returns a value 1. Then the predicate multiplies the returned value and the decremented number continuously. Thus, the factorial of a number is found. The visual prologue code to find the factorial of a number is given below:

PREDICATES
factorial(Integer,Integer)
Clauses
factorial(0,1).
factorial(X,Y):-
X<>0,S=X-1,factorial(S,Y1),Y=X*Y1.

Goal
factorial(5,X).

how to find the length of the list in Visual Prolog



Visual Prolog Program to find length of a list.

In this program the predicate length takes integer list and output a integer which is the length of list. Here the predicate length is called repeatedly or recursively until a last empty list is encountered and the 0 value is returned which is then continuously incremented to find the length.

%to find the length of the list

DOMAINS
int_list=Integer*

PREDICATES
length(int_list,integer)

CLAUSES
length([],0).
length([H|T],L):-
length(T,L1),L=L1+1.
GOAL
length([1,2,3,4,5,6],X).


output


How to find the hcf using Visual Prolog programming

Visual prolog is a software of artificial intelligence(AI).Before  we start the programming in the visual prolog ,we should install the programand we must write the code in it.and the thing we should consider is wemust save thefile in .PRO file and be placed at the location where it is stored in C: drive.(C: VIP/BIN/WIN/32).

Here is the code  to find the HCF of two numbers in visual prolog:

%TO FIND THE HCF OF TWO NUMBERS



PREDICATES
hcf(integer, integer, integer)

CLAUSES
hcf(X, Y, X):-
Y mod X = 0.
hcf(X,Y,Z):-
S = Y mod X,S<>0, hcf(S, X, Z).

GOAL
hcf(5,10,X).

OUTPUT:
To find the output press the G button on the top of the software. the output of the above program looks like this


CONCEPT:
here the concept is that when the  number is divided exactly by  the smaller number or the divisor,then the divisor is the required hcf.
and if there is remainder in the division, then the hcf of the remainder and the previous divisor is found repeadtly until the remainder is 0,

in the above example,10 %5 is 0 so the HCF is 5.
in 20 and 30, 30%20=10
since remainder is not 0,we should find now HCF of 20 and 10 ,here remiander is 0.so HCF is 10.





CODE OF PIC 16F877A FOR MAKING DVM USING MICRO C PROGRAMMING IDE


NOTE:  This is the programming code written for pic 16877 for making digital voltmeter.The IDE used for this program is micro c programming.we should also know that this code is written in C language whereas pic doesnot understand C,it only knows the Hex code so it must be first converted to hex code and then it is burned to the pic.

The design is performed in proteus

all the  things within /.........../ are the comments.




/*************display in LCD using 8-bit, 2 line mode*******/
#include <htc.h>

#define data PORTB
#define RS RD0
#define EN RD1
float result,val;
int val1,val2;
__CONFIG(HS & WDTDIS & PWRTEN & BORDIS & LVPDIS);

void delay_ms(int n )
{
           TMR1H=0xEC;        // EC77H=60535d
        TMR1L=0x77;
        T1CKPS1=0;
        T1CKPS0=0;
        TMR1CS=0;
        TMR1IF=0;
        TMR1ON=1;
           while(n>0)
           {
                while(!TMR1IF)  { }
                TMR1IF=0;
                TMR1H=0xEC;
                TMR1L=0x77;
                n--;
        }
}
void delay_100us(int n )      
{
           TMR1H=0xFE;      
        TMR1L=0x0C;
        T1CKPS1=0;
        T1CKPS0=0;
        TMR1CS=0;
        TMR1IF=0;
        TMR1ON=1;
           while(n>0)
           {
                while(!TMR1IF)  { }
                TMR1IF=0;
                TMR1H=0xFE;      
                TMR1L=0x0C;
                n--;
        }
}


void LCD_Write(unsigned char value,int rs)
{
        data = value;
        RS = rs;                                //if rs=0; command is sent to LCD otherwise data to be displayed is sent
        EN = 1;
        delay_ms(1);
        EN = 0;

}

void LCD_clear(void)
{
        LCD_Write(0x01,0);                //this clears LCD
}

void LCD_goto(unsigned char row,unsigned char column)
{
        if(row==1){
                LCD_Write(0x80+column,0);        //
        }
        else if(row==2){
                LCD_Write(0xC0+column,0);
        }


}
void LCD_num(int n)
{

    if(n<=9)
    {
            LCD_Write(48+n,1);
         }
         else if(n<=99)
         {
                 LCD_Write((n/10)+48,1);
                 LCD_Write((n%10)+48,1);
        }
        else if(n<=999)
        {
                LCD_Write((n/100)+48,1);
                LCD_Write(((n%10)/10)+48,1);
                LCD_Write((n%10)%10+48,1);
        }
}
void init_ADC()
{
        PCFG3=0;        PCFG2=0;  PCFG2=0;  PCFG0=0;                //Configures all the pins of PORTA and PORTB as ANALOG pins.

        /*For correct A/D conversions, the A/D conversion clock must be selected to ensure a minimum
        TAD time of 1.6 ms as shown in parameter 130 of the “Electrical Specifications” section.*/

        ADCS1=1;        ADCS0=0;        //this gives  32*Tosc=1.6 us
        ADFM=1;                                //Left justified format viz 6 LSBs of ADRESL regsiter are read as ‘0’.
        //Result will be held at ADRESH and ADRESL register
}
void initLCD(void)
{
        //PORT configuration
        TRISB = 0x00;
        TRISD=0x00;
        //////////////////

        LCD_Write(0x30,0);
//        data = 0x3;         // 8 bit mode
        EN=1; EN = 0;
        LCD_Write(0x38,0);
        delay_ms(1);
        LCD_Write(0x0C,0);    //dispaly on , no cursor blinking
        delay_ms(1);
        LCD_Write(0x01,0);    // clear dispaly screen


        delay_ms(1);
        LCD_Write(0x06,0);
        delay_ms(1);
        LCD_clear();
        LCD_goto(1,1);
        LCD_goto(1,1);        //1st row 1st column
    LCD_Write('D',1);delay_ms(100); LCD_Write('I',1);delay_ms(100); LCD_Write('G',1);delay_ms(100); LCD_Write('I',1);delay_ms(100);
        LCD_Write('T',1);delay_ms(100);LCD_Write('A',1);delay_ms(100);LCD_Write('L',1);delay_ms(100);LCD_Write(' ',1);delay_ms(100);
        LCD_Write('V',1);delay_ms(100);LCD_Write(' ',1);delay_ms(100);LCD_Write('M',1);delay_ms(100);LCD_Write('E',1);delay_ms(100);
    LCD_Write('T',1);delay_ms(100); LCD_Write('E',1);delay_ms(100); LCD_Write('R',1);
        LCD_goto(2,1);
    LCD_Write('D',1);  LCD_Write('C',1);  LCD_Write(' ',1);  LCD_Write('V',1);  LCD_Write('O',1);  LCD_Write('L',1);  LCD_Write('T',1);  LCD_Write('=',1);

}
/************Analog to digital conversion will occur here**********/
void ADC()
{
        ADON=1;                                         //A/D converter module is powered up
        /**********************channel one********************/
        CHS2=0; CHS1=0; CHS0=0;        // selecting pin A0 as input pin where analog signal will appear
        delay_ms(3);
    ADGO  = 1;                                         //ADGO WILL BE  RESET  BY  SYSTEM AUTOMATICALLY ONCE   ADC   IS   COMPLETE
        while(ADGO);
    result=(ADRESH<<8)+ADRESL;
    LCD_goto(2,9);
    if(result<511||result>512)
     {
         if(result>512.0)
           {//        LCD_goto(2,9);
            LCD_Write(' ',1);
             result=result-511.5;
   
        }
        else if(result<511.0)
         {//LCD_goto(2,9);
          LCD_Write('-',1);   //displaying negative sign
          result=result-511.5;
           result=-(result);
       }
       result=result*30/511.5;
       val1=(int)result;
       LCD_num(val1);
       LCD_Write('.',1);   //displaying dot sign
       val=result-val1;
       val=val*1000;
       val2=(int)(val);
       LCD_num(val2);
}
  else
    {result=0;
     LCD_Write(' ',1);
     LCD_Write(' ',1);
     result=result*30/511.5;
     val1=(int)result;
     LCD_num(val1);
     LCD_Write('.',1);   //displaying dot sign
     val=result-val1;
     val=val*1000;
     val2=(int)(val);
     LCD_num(val2);}



}

void main(void)
{        TRISB=0x00;                //Configuring all pins of B port as output.
        PORTB=0x00;                //output at all pins will be low
        TRISA=0xff;                        //Configuring all pins of A port as input
        TRISD0=TRISD1=0;
        RD0=RD1=0;
        initLCD();
        init_ADC();
while(1)
 {
        ADC();                //call ADC convert
}
}

how to solve duplicate location while installing ADT(plugin) in eclipse IDE


PROBLEM:    during the installation of ADT in the eclipse IDE,The small window appears with message "duplicate location".each time this message appears and installation is not allowed and can't be completed:

solution:
   in the website,we can find several solution to this problem.we may get  annoyed due to several answer and our problem may not be solved,i also got same problem while installing plugin.i searched this problem in the net but i could not found the best solution.

with a lot of work in it ,i fix this problem.here is the solution to this problem.it could solve your problem in an easier way:

1:  firstly if you have got the ellipse IDE ,that is compatiable without installation. in this case delete the eclipse folder
2. unzip the zip folder which we have downloaded earlier.
3. after this install the ADT ,doing this it wont ask for duplicate location again.

HOW TO START ANDROID APPS PROJECT/INSTALLATION OF SDK


This post is especially for those who are new to the android field.The first  thing we must know before starting the android project is we must install some of the kit like JDK,SDK and Android ADT plugins.

Here are the steps we should follow for the installation of the required kits:


Step 1. Preparing Your Development Computer

Before getting started with the Android SDK,system requirement must be fulfilled. In particular, you might need to install the JDK, if you don't have it already.

.


Step 2. Downloading the SDK Starter Package

The SDK starter package is not a full development environment—it includes only the core SDK Tools, which you can use to download the rest of the SDK packages (such as the latest Android platform).

If you haven't already, get the latest version of the SDK starter package from the SDK download page.

If you downloaded a .zip or .tgz package (instead of the SDK installer), unpack it to a safe location on your machine. By default, the SDK files are unpacked into a directory named android-sdk-<machine-platform>.

If you downloaded the Windows installer (.exe file), run it now and it will check whether the proper Java SE Development Kit (JDK) is installed (installing it, if necessary), then install the SDK Tools into a default location (which you can modify).

Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later, when setting up the ADT plugin and when using the SDK tools from the command line.


Step 3. Installing the ADT Plugin for Eclipse

Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications. It extends the capabilites of Eclipse to let you quickly set up new Android projects, create an application UI, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application. In general, developing in Eclipse with ADT is a highly recommended approach and is the fastest way to get started with Android.

If you'd like to use ADT for developing Android applications, install it now. Read Installing the ADT Plugin for step-by-step installation instructions, then return here to continue the last step in setting up your Android SDK.

If you prefer to work in a different IDE, you do not need to install Eclipse or ADT. Instead, you can directly use the SDK tools to build and debug your application. The Introduction to Android application development outlines the major steps that you need to complete when developing in Eclipse or other IDEs.




Step 4. Adding Platforms and Other Packages

The last step in setting up your SDK is using the Android SDK Manager (a tool included in the SDK starter package) to download essential SDK packages into your development environment.

The SDK uses a modular structure that separates the major parts of the SDK—Android platform versions, add-ons, tools, samples, and documentation—into a set of separately installable packages. The SDK starter package, which you've already downloaded, includes only a single package: the latest version of the SDK Tools. To develop an Android application, you also need to download at least one Android platform and the associated platform tools. You can add other packages and platforms as well, which is highly recommended.

If you used the Windows installer, when you complete the installation wizard, it will launch the Android SDK Manager with a default set of platforms and other packages selected for you to install. Simply click Install to accept the recommended set of packages and install them. You can then skip to Step 5, but we recommend you first read the section about the Available Packages to better understand the packages available from the Android SDK Manager.
.


FOR DETAIL INFORMATION PLEASE REFER THE OFFICIAL SITE
http://developer.android.com/sdk/installing.html