SlideShare une entreprise Scribd logo
1  sur  8
#include<iostream.h><br />    #include<stdio.h><br />    #include<conio.h><br />    #include<dos.h><br />    #include<string.h><br />    void main()<br />    {<br />    int iCh1,iInc;<br />    e:<br />    clrscr();<br />    /* To Display Main menu */<br />    gotoxy(26,40);<br />    textcolor(9);<br />    cprintf(quot;
SOFTWARE ENGINEERING PROJECTquot;
);<br />    gotoxy(32,44);<br />    textcolor(19);<br />    cprintf(quot;
BATCH-1(2006-07)quot;
);<br />    gotoxy(23,42);<br />    cprintf(quot;
WILDLIFE CONSERVATION MANAGEMENT SYSTEM ( WLCPM-2007)quot;
);<br />    gotoxy(8,45);<br />    textcolor(9);<br />    /* To Display date and time */<br />    cprintf(quot;
DATE : %s quot;
,__DATE__);<br />    gotoxy(55,45);<br />    cprintf(quot;
TIME : %s quot;
,__TIME__);<br />    for(iInc=0;iInc<=30;iInc++)<br />    {<br />    gotoxy(20,iInc);<br />    textcolor(7);<br />    cprintf(quot;
-quot;
);<br />    }<br />    for(iInc=0;iInc<80;iInc++)<br />    {<br />    gotoxy(iInc,30);<br />    textcolor(7);<br />    cprintf(quot;
|quot;
);<br />    }<br />    gotoxy(30,8);<br />    textcolor(9);<br />    /* Main menu */<br />    cprintf(quot;
WILDLIFE CONSERVATION MANAGEMENT SYSTEM (WLCPM-2007)quot;
);<br />    gotoxy(30,10);<br />    textcolor(19);<br />    cprintf(quot;
1.FOREST CONSERVATIONquot;
);<br />    gotoxy(30,12);<br />    cprintf(quot;
2.DESERT CONSERVATIONquot;
);<br />    gotoxy(30,14);<br />    cprintf(quot;
3.EXITquot;
);<br />    gotoxy(30,18);<br />    textcolor(9);<br />    cprintf(quot;
ENTER YOUR CHOICE:quot;
);<br />    scanf(quot;
%dquot;
,&iCh1);<br />    if<br />    (iCh1==3)<br />    {<br />    /* To exit from the system */<br />    gotoxy(30,28);<br />    textcolor(4);<br />    cprintf(quot;
SYSTEM SHUTTING DOWNquot;
);<br />    sleep(3);<br />    gotoxy(26,40);<br />    printf(quot;
SOFTWARE ENGINEERING PROJECTquot;
);<br />    gotoxy(8,42);<br />    printf(quot;
WILDLIFE CONSERVATION MANAGEMENT SYSTEM ( WLCPM-2007)quot;
);<br />    gotoxy(8,45);<br />    printf(quot;
DATE : %s quot;
,__DATE__);<br />    gotoxy(55,45);<br />    printf(quot;
TIME : %s quot;
,__TIME__);<br />    //exit(0);<br />    }<br />    else{<br />    /* Declarations of Variables */<br />    FILE *fp,*ft;<br />    char cAns,cChoice;<br />    struct zoo<br />    {<br />    char offspr[2],anim_history[50],an_name[30],keeper_nm[20],cellid[4],an_sex[2];<br />    int anim_age,offno;<br />    float wt,offrat,inbreed,food_s,food_c;<br />    };<br />    struct zoo e;<br />    char cell_id[4];<br />    int iF=0,iC=0,iF1=0;<br />    long int lRecsize;<br />    fp=fopen(quot;
zm.datquot;
,quot;
rb+quot;
);<br />    if(fp==NULL)<br />    {<br />    fp=fopen(quot;
m.datquot;
,quot;
wb+quot;
);<br />    if(fp==NULL)<br />    {<br />    puts(quot;
Cannot Open filequot;
);<br />    //exit();<br />    }<br />    }<br />    lRecsize=sizeof(e);<br />    while(1)<br />    {<br />    clrscr();<br />    textcolor(4);<br />    if(iCh1==1) {<br />    gotoxy(30,8);<br />    textcolor(4);<br />    cprintf(quot;
ANIMAL MENUquot;
); }<br />    else if(iCh1==2) {<br />    gotoxy(30,8);<br />    textcolor(4);<br />    cprintf(quot;
BIRD MENUquot;
); }<br />    gotoxy(26,40);<br />    textcolor(4);<br />    cprintf(quot;
SOFTWARE ENGINEERING PROJECTquot;
);<br />    gotoxy(32,44);<br />    textcolor(19);<br />    cprintf(quot;
BATCH-1(2006-07)quot;
);<br />    gotoxy(23,42);<br />    textcolor(19);<br />    cprintf(quot;
WILDLIFE CONSERVATION MANAGEMENT SYSTEM ( WLCPM-2007 )quot;
);<br />    gotoxy(8,45);<br />    textcolor(4);<br />    cprintf(quot;
DATE : %s quot;
,__DATE__);<br />    gotoxy(55,45);<br />    cprintf(quot;
TIME : %s quot;
,__TIME__);<br />    for(iInc=0;iInc<=30;iInc++)<br />    {<br />    gotoxy(20,iInc);<br />    textcolor(7);<br />    cprintf(quot;
-quot;
);<br />    }<br />    for(iInc=0;iInc<=80;iInc++)<br />    {<br />    gotoxy(iInc,30);<br />    textcolor(7);<br />    cprintf(quot;
|quot;
);<br />    }<br />    gotoxy(30,10);<br />    textcolor(19);<br />    cprintf(quot;
1.ADD quot;
);<br />    gotoxy(30,12);<br />    cprintf(quot;
2.DISPLAYquot;
);<br />    gotoxy(30,14);<br />    cprintf(quot;
3.MODIFYquot;
);<br />    gotoxy(30,16);<br />    cprintf(quot;
4.DELETEquot;
);<br />    gotoxy(30,18);<br />    cprintf(quot;
5.EXITquot;
);<br />    gotoxy(30,20);<br />    textcolor(4);<br />    cprintf(quot;
SELECT YOUR OPTION: quot;
);<br />    fflush(stdin);<br />    cChoice=getche();<br />    clrscr();<br />    gotoxy(25,8);<br />    textcolor(5);<br />    switch(cChoice)<br />    {<br />    case '1':<br />    //To add a record<br />    w:<br />    printf(quot;
ENTER CELL ID( 3 DIGIT NO.): quot;
);<br />    scanf(quot;
%squot;
,cell_id);<br />    rewind(fp);<br />    //Checking for unique id<br />    while(fread(&e,lRecsize,1,fp)==1)<br />    {<br />    if(strcmp(e.cellid,cell_id)==0)<br />    {<br />    iF=1;<br />    printf(quot;
THE ID ALREADY EXISTSquot;
);<br />    goto w;<br />    }}<br />    if(iF==0||fread(&e,lRecsize,1,fp)==0)<br />    {<br />    fseek (fp,0,SEEK_END);<br />    strcpy(e.cellid,cell_id);<br />    a3:<br />    printf(quot;
ENTER ANIMAL NAME: quot;
);<br />    scanf(quot;
%squot;
,e.an_name);<br />    if(strlen(e.an_name)>30||strlen(e.an_name)<3)<br />    goto a3;<br />    printf(quot;
ENTER ZOO KEEPER NAME: quot;
);<br />    scanf(quot;
%squot;
,e.keeper_nm); <br />    p:<br />    printf(quot;
ENTER SEX [M/F]: quot;
);<br />    scanf(quot;
%squot;
,e.an_sex);<br />    if(strlen(e.an_sex)>1)<br />    goto p;<br />    f:<br />    printf(quot;
ENTER AGE : quot;
);<br />    scanf(quot;
%dquot;
,&e.anim_age);<br />    if(e.anim_age<0||e.anim_age>100)<br />    goto f; <br />    a5:<br />    printf(quot;
OFFSPRING [P/A]:quot;
);<br />    scanf(quot;
%squot;
,&e.offspr);<br />    if(strlen(e.offspr)>1)<br />    goto a5;<br />    printf(quot;
ENTER NO. OF OFFSPRING: quot;
);<br />    scanf(quot;
%dquot;
,&e.offno);<br />    printf(quot;
FOOD SUPPLIED( IN KG): quot;
);<br />    scanf(quot;
%fquot;
,&e.food_s);<br />    printf(quot;
FOOD CONSUMED( IN KG): quot;
);<br />    scanf(quot;
%fquot;
,&e.food_c);<br />    a2:<br />    printf(quot;
ANIMAL DETAILS(IF ANY)(Don't leave space,use '_'): quot;
);<br />    scanf(quot;
%squot;
,e.anim_history);<br />    if(strlen(e.anim_history)>50)<br />    goto a2;<br />    fwrite(&e,lRecsize,1,fp);<br />    /*Flushes a stream On success returns 0 , On error returns EOF */<br />    fflush(stdin);<br />    }<br />    break;<br />    case '2':<br />    //Searching and displaying all the infor<br />    //     mation by id<br />    textcolor(7);<br />    printf(quot;
ENTER CELL ID: quot;
);<br />    scanf(quot;
%squot;
,cell_id);<br />    rewind(fp);<br />    while(fread(&e,lRecsize,1,fp)!=0)<br />    {<br />    if(strcmp(e.cellid,cell_id)==0)<br />    { iC=1;<br />    clrscr();<br />    //Display according to Main menu<br />    gotoxy(0,20);<br />    //FOREST CONSERVATION<br />    if(iCh1==1){<br />    printf(quot;
DETAILS OF THE ANIMAL:%squot;
,strupr(e.an_name));<br />    printf(quot;
_____________________________________________________________________quot;
);<br />    printf(quot;
 NAME : %s CELL ID : %s ZOO KEEPER NAME : %s SEX: %s AGE : %d  OFFSPRING: %s OFFSPRING NO. : %d OFFSPRING RATIO : %f INBREED RATIO : %f FOOD SUPPLIED : %f FOOD CONSUMED : %f ANIMAL DETAILS: %squot;
,strupr(e.an_name),strupr(e.cellid),strupr(e.keeper_nm),strupr(e.an_sex),e.anim_age,strupr(e.offspr),e.offno,(e.offno/13.33*6.2),(e.offno*12.66/17.3574),e.food_s,e.food_c,strupr(e.anim_history));<br />    printf(quot;
_____________________________________________________________________quot;
);<br />    getch(); }<br />    //DESERT CONSERVATION<br />    else if(iCh1==2){<br />    printf(quot;
DETAILS OF BIRD:%squot;
,strupr(e.an_name));<br />    printf(quot;
_____________________________________________________________________quot;
);<br />    printf(quot;
 NAME : %s CELL ID : %s ZOO KEEPER NAME : %s AGE: %d SEX : %s  OFFSPRING: %s OFFSPRING NO. : %d OFFSPRING RATIO : %f INBREED RATIO : %f FOOD SUPPLIED : %f FOOD CONSUMED : %f ANIMAL DETAILS: %squot;
,strupr(e.an_name),strupr(e.cellid),strupr(e.keeper_nm),e.anim_age,strupr(e.an_sex),strupr(e.offspr),e.offno,(e.offno/13.33*6.2),(e.offno*12.66/17.3574),e.food_s,e.food_c,strupr(e.anim_history));<br />    printf(quot;
_____________________________________________________________________quot;
);<br />    getch(); }<br />    }<br />    }<br />    if(iC==0)<br />    {<br />    printf(quot;
RECORD DOESN'T EXISTS..quot;
);<br />    getch();<br />    }iC=0;<br />    break;<br />    case '3':<br />    //Searching and modifying Records by id<br />    cAns='y';<br />    while(cAns=='y')<br />    {<br />    printf(quot;
ENTER CELL ID: quot;
);<br />    scanf(quot;
%squot;
,cell_id);<br />    rewind(fp);<br />    while(fread(&e,lRecsize,1,fp)==1)<br />    {<br />    if(strcmp(e.cellid,cell_id)==0)<br />    {<br />    b:<br />    printf(quot;
ENTER ANIMAL NAME: %s : quot;
,strupr(e.an_name));<br />    scanf(quot;
%squot;
,e.an_name);<br />    if(strlen(e.an_name)>20||strlen(e.an_name)<3)<br />    goto b;<br />    b1:<br />    printf(quot;
 ENTER SEX : %s : quot;
,strupr(e.an_sex));<br />    scanf(quot;
%squot;
,e.an_sex);<br />    if(strlen(e.an_sex)>1)<br />    goto b1;<br />    r:<br />    printf(quot;
 ENTER AGE: %d : quot;
 ,e.anim_age);<br />    scanf(quot;
%dquot;
,&e.anim_age);<br />    if(e.anim_age<1||e.anim_age>100)<br />    goto r;<br />    ad:<br />    printf(quot;
 OFFSPRING : %s : quot;
,strupr(e.offspr));<br />    scanf(quot;
%squot;
,e.offspr);<br />    if(strlen(e.offspr)<1)<br />    goto ad;<br />    printf(quot;
 ENTER NO. OF OFFSPRING: %d :quot;
,e.offno);<br />    scanf(quot;
%dquot;
,&e.offno);<br />    printf(quot;
 ENTER FOOD SUPPLIED(IN KG): %f :quot;
,e.food_s);<br />    scanf(quot;
%fquot;
,&e.food_s);<br />    printf(quot;
FOOD CONSUMED( IN KG): quot;
);<br />    scanf(quot;
%fquot;
,&e.food_c);<br />    b5:<br />    printf(quot;
ANIMAL DETAILS( IF ANY )(Dont leave space,use'_'instead)': %s : quot;
,e.anim_history);<br />    scanf(quot;
%squot;
,e.anim_history);<br />    if(strlen(e.anim_history)>50)<br />    goto b5;<br />    fseek(fp,-lRecsize,SEEK_CUR); //Repositions the file pointer of a stream<br />    fwrite(&e,lRecsize,1,fp);<br />    printf(quot;
RECORD MODIFIED quot;
);<br />    break;<br />    }<br />    }<br />    printf(quot;
DO U WANT TO MODIFY ANY RECORD[y/n]quot;
);<br />    /*Flushes a stream On success returns 0 , On error returns EOF */<br />    fflush(stdin);<br />    cAns=getche();<br />    }<br />    break;<br />    case '4':<br />    //Searching and deleting records by id<br />    cAns='y';<br />    while(cAns=='y')<br />    {<br />    printf(quot;
ENTER CELL ID TO DELETE RECORD : quot;
);<br />    scanf(quot;
%squot;
,cell_id);<br />    ft=fopen(quot;
temp.datquot;
,quot;
wbquot;
);<br />    rewind(fp); //Repositions file pointer to stream's beginning<br />    while(fread(&e,lRecsize,1,fp)!=0)<br />    {<br />    if(strcmp(e.cellid,cell_id)!=0) {<br />    fwrite(&e,lRecsize,1,ft);<br />    }<br />    else {<br />    iF1=1;<br />    printf(quot;
 RECORD DELETED SUCCESSFULLYquot;
);<br />    }<br />    }<br />    if(iF1!=1){iF1=0;<br />    printf(quot;
 NO SUCH RECORD FOUNDquot;
);}<br />    fclose(fp);<br />    fclose(ft);<br />    remove(quot;
zm.datquot;
);<br />    rename(quot;
temp.datquot;
,quot;
zm.datquot;
);<br />    fp=fopen(quot;
zm.datquot;
,quot;
rb+quot;
);<br />    printf(quot;
DO U WANT TO DELETE ANOTHER RECORD[y/n]quot;
);<br />    fflush(stdin);<br />    cAns=getche();<br />    }<br />    break;<br />    case '5':<br />    fclose(fp);<br />    goto e;<br />    }<br />    }<br />    }<br />    }<br />
Wildlife conservation project management  adri jovin
Wildlife conservation project management  adri jovin
Wildlife conservation project management  adri jovin
Wildlife conservation project management  adri jovin
Wildlife conservation project management  adri jovin
Wildlife conservation project management  adri jovin
Wildlife conservation project management  adri jovin

Contenu connexe

Tendances

Tendances (20)

Simple C programs
Simple C programsSimple C programs
Simple C programs
 
Avl tree
Avl treeAvl tree
Avl tree
 
C Programming lab
C Programming labC Programming lab
C Programming lab
 
Stack prgs
Stack prgsStack prgs
Stack prgs
 
2 3. standard io
2 3. standard io2 3. standard io
2 3. standard io
 
โปรแกรมย่อยและฟังชันก์มาตรฐาน
โปรแกรมย่อยและฟังชันก์มาตรฐานโปรแกรมย่อยและฟังชันก์มาตรฐาน
โปรแกรมย่อยและฟังชันก์มาตรฐาน
 
8.1
8.18.1
8.1
 
Sary
SarySary
Sary
 
Travel management
Travel managementTravel management
Travel management
 
Data structures
Data structuresData structures
Data structures
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
Session07 recursion
Session07 recursionSession07 recursion
Session07 recursion
 
Amazon VPC and Amazon EC2
Amazon VPC and Amazon EC2Amazon VPC and Amazon EC2
Amazon VPC and Amazon EC2
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
Fine-grained Processing of CVS Archives with APFEL
Fine-grained Processing of CVS Archives with APFELFine-grained Processing of CVS Archives with APFEL
Fine-grained Processing of CVS Archives with APFEL
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
 
Ejercicios Scilab Completo
Ejercicios Scilab CompletoEjercicios Scilab Completo
Ejercicios Scilab Completo
 
Trabajo Scilab
Trabajo ScilabTrabajo Scilab
Trabajo Scilab
 
Taller De Scilab
Taller De ScilabTaller De Scilab
Taller De Scilab
 

En vedette

The Dark Side Of The Internet
The Dark Side Of The InternetThe Dark Side Of The Internet
The Dark Side Of The InternetDavy Nijs
 
Máxima Medisch Centrum, Masterclass Social Media 101007
Máxima Medisch Centrum, Masterclass Social Media 101007Máxima Medisch Centrum, Masterclass Social Media 101007
Máxima Medisch Centrum, Masterclass Social Media 101007Kamsteeg Executive Search
 
FACET Academy Rabobank - Blue ocean
FACET Academy Rabobank - Blue oceanFACET Academy Rabobank - Blue ocean
FACET Academy Rabobank - Blue oceanfransvanrooij
 
Power point del photoshop
Power point del photoshopPower point del photoshop
Power point del photoshopclaranabar
 
Bibliahét 2009 szeptember
Bibliahét 2009 szeptemberBibliahét 2009 szeptember
Bibliahét 2009 szeptemberEnikő Márton
 
Cast and Crew List 2
Cast and Crew List 2 Cast and Crew List 2
Cast and Crew List 2 Waka Ramanlal
 
Makalah komunikasi
Makalah komunikasiMakalah komunikasi
Makalah komunikasiWarnet Raha
 
Построение изображений в зеркале
Построение изображений в зеркалеПостроение изображений в зеркале
Построение изображений в зеркалеMarina_stn
 
Starting and Growing A Successful Online Learning Program
Starting and Growing A Successful Online Learning Program Starting and Growing A Successful Online Learning Program
Starting and Growing A Successful Online Learning Program Blackboard
 
Stainless steel male connectors r
Stainless steel male connectors rStainless steel male connectors r
Stainless steel male connectors rconexcoppe
 
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...MYO AUNG Myanmar
 
Ashwins Google Presentation
Ashwins Google PresentationAshwins Google Presentation
Ashwins Google Presentationashwinkapadiya
 

En vedette (18)

Symantec Cloud 22 juni 2012
Symantec Cloud   22 juni 2012Symantec Cloud   22 juni 2012
Symantec Cloud 22 juni 2012
 
The Dark Side Of The Internet
The Dark Side Of The InternetThe Dark Side Of The Internet
The Dark Side Of The Internet
 
Máxima Medisch Centrum, Masterclass Social Media 101007
Máxima Medisch Centrum, Masterclass Social Media 101007Máxima Medisch Centrum, Masterclass Social Media 101007
Máxima Medisch Centrum, Masterclass Social Media 101007
 
Masterclass blue ocean Welzijnsnetwerk nederland
Masterclass blue ocean Welzijnsnetwerk nederlandMasterclass blue ocean Welzijnsnetwerk nederland
Masterclass blue ocean Welzijnsnetwerk nederland
 
FACET Academy Rabobank - Blue ocean
FACET Academy Rabobank - Blue oceanFACET Academy Rabobank - Blue ocean
FACET Academy Rabobank - Blue ocean
 
Power point del photoshop
Power point del photoshopPower point del photoshop
Power point del photoshop
 
Bibliahét 2009 szeptember
Bibliahét 2009 szeptemberBibliahét 2009 szeptember
Bibliahét 2009 szeptember
 
Cast and Crew List 2
Cast and Crew List 2 Cast and Crew List 2
Cast and Crew List 2
 
Tarea 2012h
Tarea 2012hTarea 2012h
Tarea 2012h
 
Makalah komunikasi
Makalah komunikasiMakalah komunikasi
Makalah komunikasi
 
Caddie Powerpoint
Caddie PowerpointCaddie Powerpoint
Caddie Powerpoint
 
Question1final
Question1finalQuestion1final
Question1final
 
Построение изображений в зеркале
Построение изображений в зеркалеПостроение изображений в зеркале
Построение изображений в зеркале
 
French 101 1 1
French 101 1 1French 101 1 1
French 101 1 1
 
Starting and Growing A Successful Online Learning Program
Starting and Growing A Successful Online Learning Program Starting and Growing A Successful Online Learning Program
Starting and Growing A Successful Online Learning Program
 
Stainless steel male connectors r
Stainless steel male connectors rStainless steel male connectors r
Stainless steel male connectors r
 
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
ATLAS OF MINERAL RESOURCES OF THE ESCAPE REGION VOLUME 12 GEOLOGY AND MINERAL...
 
Ashwins Google Presentation
Ashwins Google PresentationAshwins Google Presentation
Ashwins Google Presentation
 

Similaire à Wildlife conservation project management adri jovin

Dti2143 lab sheet 8
Dti2143 lab sheet 8Dti2143 lab sheet 8
Dti2143 lab sheet 8alish sha
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8alish sha
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8alish sha
 
4 operators, expressions &amp; statements
4  operators, expressions &amp; statements4  operators, expressions &amp; statements
4 operators, expressions &amp; statementsMomenMostafa
 
Bti1022 lab sheet 7
Bti1022 lab sheet 7Bti1022 lab sheet 7
Bti1022 lab sheet 7alish sha
 
Network lap pgms 7th semester
Network lap pgms 7th semesterNetwork lap pgms 7th semester
Network lap pgms 7th semesterDOSONKA Group
 
6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumpingMomenMostafa
 
Dti2143 lab sheet 7
Dti2143 lab sheet 7Dti2143 lab sheet 7
Dti2143 lab sheet 7alish sha
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3alish sha
 
Program for pyramid
Program for pyramidProgram for pyramid
Program for pyramidnayakq
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C LanguageRAJWANT KAUR
 
ood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfaroramobiles1
 
Compiler Design Lab File
Compiler Design Lab FileCompiler Design Lab File
Compiler Design Lab FileKandarp Tiwari
 
Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8alish sha
 

Similaire à Wildlife conservation project management adri jovin (20)

Dti2143 lab sheet 8
Dti2143 lab sheet 8Dti2143 lab sheet 8
Dti2143 lab sheet 8
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8
 
Bti1022 lab sheet 8
Bti1022 lab sheet 8Bti1022 lab sheet 8
Bti1022 lab sheet 8
 
4 operators, expressions &amp; statements
4  operators, expressions &amp; statements4  operators, expressions &amp; statements
4 operators, expressions &amp; statements
 
Bti1022 lab sheet 7
Bti1022 lab sheet 7Bti1022 lab sheet 7
Bti1022 lab sheet 7
 
Network lap pgms 7th semester
Network lap pgms 7th semesterNetwork lap pgms 7th semester
Network lap pgms 7th semester
 
6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping
 
Lab loop
Lab loopLab loop
Lab loop
 
Dti2143 lab sheet 7
Dti2143 lab sheet 7Dti2143 lab sheet 7
Dti2143 lab sheet 7
 
Bti1022 lab sheet 3
Bti1022 lab sheet 3Bti1022 lab sheet 3
Bti1022 lab sheet 3
 
Program for pyramid
Program for pyramidProgram for pyramid
Program for pyramid
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
Unit2 C
Unit2 C Unit2 C
Unit2 C
 
Unit2 C
Unit2 CUnit2 C
Unit2 C
 
Design problem
Design problemDesign problem
Design problem
 
ood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdf
 
Presentation1
Presentation1Presentation1
Presentation1
 
Compiler Design Lab File
Compiler Design Lab FileCompiler Design Lab File
Compiler Design Lab File
 
Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8Dti2143 dam31303 lab sheet 8
Dti2143 dam31303 lab sheet 8
 
C language program
C language programC language program
C language program
 

Plus de Adri Jovin

Adri Jovin J J - CV
Adri Jovin J J - CVAdri Jovin J J - CV
Adri Jovin J J - CVAdri Jovin
 
Introduction to Relational Database Management Systems
Introduction to Relational Database Management SystemsIntroduction to Relational Database Management Systems
Introduction to Relational Database Management SystemsAdri Jovin
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER DiagramsAdri Jovin
 
Introduction to Database Management Systems
Introduction to Database Management SystemsIntroduction to Database Management Systems
Introduction to Database Management SystemsAdri Jovin
 
Neural Networks
Neural NetworksNeural Networks
Neural NetworksAdri Jovin
 
Introduction to Genetic Algorithm
Introduction to Genetic AlgorithmIntroduction to Genetic Algorithm
Introduction to Genetic AlgorithmAdri Jovin
 
Introduction to Fuzzy logic
Introduction to Fuzzy logicIntroduction to Fuzzy logic
Introduction to Fuzzy logicAdri Jovin
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksAdri Jovin
 
Introductory Session on Soft Computing
Introductory Session on Soft ComputingIntroductory Session on Soft Computing
Introductory Session on Soft ComputingAdri Jovin
 
Creative Commons
Creative CommonsCreative Commons
Creative CommonsAdri Jovin
 
Image based security
Image based securityImage based security
Image based securityAdri Jovin
 
Blockchain Technologies
Blockchain TechnologiesBlockchain Technologies
Blockchain TechnologiesAdri Jovin
 
Introduction to Cybersecurity
Introduction to CybersecurityIntroduction to Cybersecurity
Introduction to CybersecurityAdri Jovin
 
Advanced Encryption System & Block Cipher Modes of Operations
Advanced Encryption System & Block Cipher Modes of OperationsAdvanced Encryption System & Block Cipher Modes of Operations
Advanced Encryption System & Block Cipher Modes of OperationsAdri Jovin
 
Heartbleed Bug: A case study
Heartbleed Bug: A case studyHeartbleed Bug: A case study
Heartbleed Bug: A case studyAdri Jovin
 
Zoom: Privacy and Security - A case study
Zoom: Privacy and Security - A case studyZoom: Privacy and Security - A case study
Zoom: Privacy and Security - A case studyAdri Jovin
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve CryptographyAdri Jovin
 
El Gamal Cryptosystem
El Gamal CryptosystemEl Gamal Cryptosystem
El Gamal CryptosystemAdri Jovin
 
Data Encryption Standard
Data Encryption StandardData Encryption Standard
Data Encryption StandardAdri Jovin
 
Classical cryptographic techniques, Feistel cipher structure
Classical cryptographic techniques, Feistel cipher structureClassical cryptographic techniques, Feistel cipher structure
Classical cryptographic techniques, Feistel cipher structureAdri Jovin
 

Plus de Adri Jovin (20)

Adri Jovin J J - CV
Adri Jovin J J - CVAdri Jovin J J - CV
Adri Jovin J J - CV
 
Introduction to Relational Database Management Systems
Introduction to Relational Database Management SystemsIntroduction to Relational Database Management Systems
Introduction to Relational Database Management Systems
 
Introduction to ER Diagrams
Introduction to ER DiagramsIntroduction to ER Diagrams
Introduction to ER Diagrams
 
Introduction to Database Management Systems
Introduction to Database Management SystemsIntroduction to Database Management Systems
Introduction to Database Management Systems
 
Neural Networks
Neural NetworksNeural Networks
Neural Networks
 
Introduction to Genetic Algorithm
Introduction to Genetic AlgorithmIntroduction to Genetic Algorithm
Introduction to Genetic Algorithm
 
Introduction to Fuzzy logic
Introduction to Fuzzy logicIntroduction to Fuzzy logic
Introduction to Fuzzy logic
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural Networks
 
Introductory Session on Soft Computing
Introductory Session on Soft ComputingIntroductory Session on Soft Computing
Introductory Session on Soft Computing
 
Creative Commons
Creative CommonsCreative Commons
Creative Commons
 
Image based security
Image based securityImage based security
Image based security
 
Blockchain Technologies
Blockchain TechnologiesBlockchain Technologies
Blockchain Technologies
 
Introduction to Cybersecurity
Introduction to CybersecurityIntroduction to Cybersecurity
Introduction to Cybersecurity
 
Advanced Encryption System & Block Cipher Modes of Operations
Advanced Encryption System & Block Cipher Modes of OperationsAdvanced Encryption System & Block Cipher Modes of Operations
Advanced Encryption System & Block Cipher Modes of Operations
 
Heartbleed Bug: A case study
Heartbleed Bug: A case studyHeartbleed Bug: A case study
Heartbleed Bug: A case study
 
Zoom: Privacy and Security - A case study
Zoom: Privacy and Security - A case studyZoom: Privacy and Security - A case study
Zoom: Privacy and Security - A case study
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
El Gamal Cryptosystem
El Gamal CryptosystemEl Gamal Cryptosystem
El Gamal Cryptosystem
 
Data Encryption Standard
Data Encryption StandardData Encryption Standard
Data Encryption Standard
 
Classical cryptographic techniques, Feistel cipher structure
Classical cryptographic techniques, Feistel cipher structureClassical cryptographic techniques, Feistel cipher structure
Classical cryptographic techniques, Feistel cipher structure
 

Dernier

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Dernier (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Wildlife conservation project management adri jovin

  • 1. #include<iostream.h><br /> #include<stdio.h><br /> #include<conio.h><br /> #include<dos.h><br /> #include<string.h><br /> void main()<br /> {<br /> int iCh1,iInc;<br /> e:<br /> clrscr();<br /> /* To Display Main menu */<br /> gotoxy(26,40);<br /> textcolor(9);<br /> cprintf(quot; SOFTWARE ENGINEERING PROJECTquot; );<br /> gotoxy(32,44);<br /> textcolor(19);<br /> cprintf(quot; BATCH-1(2006-07)quot; );<br /> gotoxy(23,42);<br /> cprintf(quot; WILDLIFE CONSERVATION MANAGEMENT SYSTEM ( WLCPM-2007)quot; );<br /> gotoxy(8,45);<br /> textcolor(9);<br /> /* To Display date and time */<br /> cprintf(quot; DATE : %s quot; ,__DATE__);<br /> gotoxy(55,45);<br /> cprintf(quot; TIME : %s quot; ,__TIME__);<br /> for(iInc=0;iInc<=30;iInc++)<br /> {<br /> gotoxy(20,iInc);<br /> textcolor(7);<br /> cprintf(quot; -quot; );<br /> }<br /> for(iInc=0;iInc<80;iInc++)<br /> {<br /> gotoxy(iInc,30);<br /> textcolor(7);<br /> cprintf(quot; |quot; );<br /> }<br /> gotoxy(30,8);<br /> textcolor(9);<br /> /* Main menu */<br /> cprintf(quot; WILDLIFE CONSERVATION MANAGEMENT SYSTEM (WLCPM-2007)quot; );<br /> gotoxy(30,10);<br /> textcolor(19);<br /> cprintf(quot; 1.FOREST CONSERVATIONquot; );<br /> gotoxy(30,12);<br /> cprintf(quot; 2.DESERT CONSERVATIONquot; );<br /> gotoxy(30,14);<br /> cprintf(quot; 3.EXITquot; );<br /> gotoxy(30,18);<br /> textcolor(9);<br /> cprintf(quot; ENTER YOUR CHOICE:quot; );<br /> scanf(quot; %dquot; ,&iCh1);<br /> if<br /> (iCh1==3)<br /> {<br /> /* To exit from the system */<br /> gotoxy(30,28);<br /> textcolor(4);<br /> cprintf(quot; SYSTEM SHUTTING DOWNquot; );<br /> sleep(3);<br /> gotoxy(26,40);<br /> printf(quot; SOFTWARE ENGINEERING PROJECTquot; );<br /> gotoxy(8,42);<br /> printf(quot; WILDLIFE CONSERVATION MANAGEMENT SYSTEM ( WLCPM-2007)quot; );<br /> gotoxy(8,45);<br /> printf(quot; DATE : %s quot; ,__DATE__);<br /> gotoxy(55,45);<br /> printf(quot; TIME : %s quot; ,__TIME__);<br /> //exit(0);<br /> }<br /> else{<br /> /* Declarations of Variables */<br /> FILE *fp,*ft;<br /> char cAns,cChoice;<br /> struct zoo<br /> {<br /> char offspr[2],anim_history[50],an_name[30],keeper_nm[20],cellid[4],an_sex[2];<br /> int anim_age,offno;<br /> float wt,offrat,inbreed,food_s,food_c;<br /> };<br /> struct zoo e;<br /> char cell_id[4];<br /> int iF=0,iC=0,iF1=0;<br /> long int lRecsize;<br /> fp=fopen(quot; zm.datquot; ,quot; rb+quot; );<br /> if(fp==NULL)<br /> {<br /> fp=fopen(quot; m.datquot; ,quot; wb+quot; );<br /> if(fp==NULL)<br /> {<br /> puts(quot; Cannot Open filequot; );<br /> //exit();<br /> }<br /> }<br /> lRecsize=sizeof(e);<br /> while(1)<br /> {<br /> clrscr();<br /> textcolor(4);<br /> if(iCh1==1) {<br /> gotoxy(30,8);<br /> textcolor(4);<br /> cprintf(quot; ANIMAL MENUquot; ); }<br /> else if(iCh1==2) {<br /> gotoxy(30,8);<br /> textcolor(4);<br /> cprintf(quot; BIRD MENUquot; ); }<br /> gotoxy(26,40);<br /> textcolor(4);<br /> cprintf(quot; SOFTWARE ENGINEERING PROJECTquot; );<br /> gotoxy(32,44);<br /> textcolor(19);<br /> cprintf(quot; BATCH-1(2006-07)quot; );<br /> gotoxy(23,42);<br /> textcolor(19);<br /> cprintf(quot; WILDLIFE CONSERVATION MANAGEMENT SYSTEM ( WLCPM-2007 )quot; );<br /> gotoxy(8,45);<br /> textcolor(4);<br /> cprintf(quot; DATE : %s quot; ,__DATE__);<br /> gotoxy(55,45);<br /> cprintf(quot; TIME : %s quot; ,__TIME__);<br /> for(iInc=0;iInc<=30;iInc++)<br /> {<br /> gotoxy(20,iInc);<br /> textcolor(7);<br /> cprintf(quot; -quot; );<br /> }<br /> for(iInc=0;iInc<=80;iInc++)<br /> {<br /> gotoxy(iInc,30);<br /> textcolor(7);<br /> cprintf(quot; |quot; );<br /> }<br /> gotoxy(30,10);<br /> textcolor(19);<br /> cprintf(quot; 1.ADD quot; );<br /> gotoxy(30,12);<br /> cprintf(quot; 2.DISPLAYquot; );<br /> gotoxy(30,14);<br /> cprintf(quot; 3.MODIFYquot; );<br /> gotoxy(30,16);<br /> cprintf(quot; 4.DELETEquot; );<br /> gotoxy(30,18);<br /> cprintf(quot; 5.EXITquot; );<br /> gotoxy(30,20);<br /> textcolor(4);<br /> cprintf(quot; SELECT YOUR OPTION: quot; );<br /> fflush(stdin);<br /> cChoice=getche();<br /> clrscr();<br /> gotoxy(25,8);<br /> textcolor(5);<br /> switch(cChoice)<br /> {<br /> case '1':<br /> //To add a record<br /> w:<br /> printf(quot; ENTER CELL ID( 3 DIGIT NO.): quot; );<br /> scanf(quot; %squot; ,cell_id);<br /> rewind(fp);<br /> //Checking for unique id<br /> while(fread(&e,lRecsize,1,fp)==1)<br /> {<br /> if(strcmp(e.cellid,cell_id)==0)<br /> {<br /> iF=1;<br /> printf(quot; THE ID ALREADY EXISTSquot; );<br /> goto w;<br /> }}<br /> if(iF==0||fread(&e,lRecsize,1,fp)==0)<br /> {<br /> fseek (fp,0,SEEK_END);<br /> strcpy(e.cellid,cell_id);<br /> a3:<br /> printf(quot; ENTER ANIMAL NAME: quot; );<br /> scanf(quot; %squot; ,e.an_name);<br /> if(strlen(e.an_name)>30||strlen(e.an_name)<3)<br /> goto a3;<br /> printf(quot; ENTER ZOO KEEPER NAME: quot; );<br /> scanf(quot; %squot; ,e.keeper_nm); <br /> p:<br /> printf(quot; ENTER SEX [M/F]: quot; );<br /> scanf(quot; %squot; ,e.an_sex);<br /> if(strlen(e.an_sex)>1)<br /> goto p;<br /> f:<br /> printf(quot; ENTER AGE : quot; );<br /> scanf(quot; %dquot; ,&e.anim_age);<br /> if(e.anim_age<0||e.anim_age>100)<br /> goto f; <br /> a5:<br /> printf(quot; OFFSPRING [P/A]:quot; );<br /> scanf(quot; %squot; ,&e.offspr);<br /> if(strlen(e.offspr)>1)<br /> goto a5;<br /> printf(quot; ENTER NO. OF OFFSPRING: quot; );<br /> scanf(quot; %dquot; ,&e.offno);<br /> printf(quot; FOOD SUPPLIED( IN KG): quot; );<br /> scanf(quot; %fquot; ,&e.food_s);<br /> printf(quot; FOOD CONSUMED( IN KG): quot; );<br /> scanf(quot; %fquot; ,&e.food_c);<br /> a2:<br /> printf(quot; ANIMAL DETAILS(IF ANY)(Don't leave space,use '_'): quot; );<br /> scanf(quot; %squot; ,e.anim_history);<br /> if(strlen(e.anim_history)>50)<br /> goto a2;<br /> fwrite(&e,lRecsize,1,fp);<br /> /*Flushes a stream On success returns 0 , On error returns EOF */<br /> fflush(stdin);<br /> }<br /> break;<br /> case '2':<br /> //Searching and displaying all the infor<br /> // mation by id<br /> textcolor(7);<br /> printf(quot; ENTER CELL ID: quot; );<br /> scanf(quot; %squot; ,cell_id);<br /> rewind(fp);<br /> while(fread(&e,lRecsize,1,fp)!=0)<br /> {<br /> if(strcmp(e.cellid,cell_id)==0)<br /> { iC=1;<br /> clrscr();<br /> //Display according to Main menu<br /> gotoxy(0,20);<br /> //FOREST CONSERVATION<br /> if(iCh1==1){<br /> printf(quot; DETAILS OF THE ANIMAL:%squot; ,strupr(e.an_name));<br /> printf(quot; _____________________________________________________________________quot; );<br /> printf(quot; NAME : %s CELL ID : %s ZOO KEEPER NAME : %s SEX: %s AGE : %d OFFSPRING: %s OFFSPRING NO. : %d OFFSPRING RATIO : %f INBREED RATIO : %f FOOD SUPPLIED : %f FOOD CONSUMED : %f ANIMAL DETAILS: %squot; ,strupr(e.an_name),strupr(e.cellid),strupr(e.keeper_nm),strupr(e.an_sex),e.anim_age,strupr(e.offspr),e.offno,(e.offno/13.33*6.2),(e.offno*12.66/17.3574),e.food_s,e.food_c,strupr(e.anim_history));<br /> printf(quot; _____________________________________________________________________quot; );<br /> getch(); }<br /> //DESERT CONSERVATION<br /> else if(iCh1==2){<br /> printf(quot; DETAILS OF BIRD:%squot; ,strupr(e.an_name));<br /> printf(quot; _____________________________________________________________________quot; );<br /> printf(quot; NAME : %s CELL ID : %s ZOO KEEPER NAME : %s AGE: %d SEX : %s OFFSPRING: %s OFFSPRING NO. : %d OFFSPRING RATIO : %f INBREED RATIO : %f FOOD SUPPLIED : %f FOOD CONSUMED : %f ANIMAL DETAILS: %squot; ,strupr(e.an_name),strupr(e.cellid),strupr(e.keeper_nm),e.anim_age,strupr(e.an_sex),strupr(e.offspr),e.offno,(e.offno/13.33*6.2),(e.offno*12.66/17.3574),e.food_s,e.food_c,strupr(e.anim_history));<br /> printf(quot; _____________________________________________________________________quot; );<br /> getch(); }<br /> }<br /> }<br /> if(iC==0)<br /> {<br /> printf(quot; RECORD DOESN'T EXISTS..quot; );<br /> getch();<br /> }iC=0;<br /> break;<br /> case '3':<br /> //Searching and modifying Records by id<br /> cAns='y';<br /> while(cAns=='y')<br /> {<br /> printf(quot; ENTER CELL ID: quot; );<br /> scanf(quot; %squot; ,cell_id);<br /> rewind(fp);<br /> while(fread(&e,lRecsize,1,fp)==1)<br /> {<br /> if(strcmp(e.cellid,cell_id)==0)<br /> {<br /> b:<br /> printf(quot; ENTER ANIMAL NAME: %s : quot; ,strupr(e.an_name));<br /> scanf(quot; %squot; ,e.an_name);<br /> if(strlen(e.an_name)>20||strlen(e.an_name)<3)<br /> goto b;<br /> b1:<br /> printf(quot; ENTER SEX : %s : quot; ,strupr(e.an_sex));<br /> scanf(quot; %squot; ,e.an_sex);<br /> if(strlen(e.an_sex)>1)<br /> goto b1;<br /> r:<br /> printf(quot; ENTER AGE: %d : quot; ,e.anim_age);<br /> scanf(quot; %dquot; ,&e.anim_age);<br /> if(e.anim_age<1||e.anim_age>100)<br /> goto r;<br /> ad:<br /> printf(quot; OFFSPRING : %s : quot; ,strupr(e.offspr));<br /> scanf(quot; %squot; ,e.offspr);<br /> if(strlen(e.offspr)<1)<br /> goto ad;<br /> printf(quot; ENTER NO. OF OFFSPRING: %d :quot; ,e.offno);<br /> scanf(quot; %dquot; ,&e.offno);<br /> printf(quot; ENTER FOOD SUPPLIED(IN KG): %f :quot; ,e.food_s);<br /> scanf(quot; %fquot; ,&e.food_s);<br /> printf(quot; FOOD CONSUMED( IN KG): quot; );<br /> scanf(quot; %fquot; ,&e.food_c);<br /> b5:<br /> printf(quot; ANIMAL DETAILS( IF ANY )(Dont leave space,use'_'instead)': %s : quot; ,e.anim_history);<br /> scanf(quot; %squot; ,e.anim_history);<br /> if(strlen(e.anim_history)>50)<br /> goto b5;<br /> fseek(fp,-lRecsize,SEEK_CUR); //Repositions the file pointer of a stream<br /> fwrite(&e,lRecsize,1,fp);<br /> printf(quot; RECORD MODIFIED quot; );<br /> break;<br /> }<br /> }<br /> printf(quot; DO U WANT TO MODIFY ANY RECORD[y/n]quot; );<br /> /*Flushes a stream On success returns 0 , On error returns EOF */<br /> fflush(stdin);<br /> cAns=getche();<br /> }<br /> break;<br /> case '4':<br /> //Searching and deleting records by id<br /> cAns='y';<br /> while(cAns=='y')<br /> {<br /> printf(quot; ENTER CELL ID TO DELETE RECORD : quot; );<br /> scanf(quot; %squot; ,cell_id);<br /> ft=fopen(quot; temp.datquot; ,quot; wbquot; );<br /> rewind(fp); //Repositions file pointer to stream's beginning<br /> while(fread(&e,lRecsize,1,fp)!=0)<br /> {<br /> if(strcmp(e.cellid,cell_id)!=0) {<br /> fwrite(&e,lRecsize,1,ft);<br /> }<br /> else {<br /> iF1=1;<br /> printf(quot; RECORD DELETED SUCCESSFULLYquot; );<br /> }<br /> }<br /> if(iF1!=1){iF1=0;<br /> printf(quot; NO SUCH RECORD FOUNDquot; );}<br /> fclose(fp);<br /> fclose(ft);<br /> remove(quot; zm.datquot; );<br /> rename(quot; temp.datquot; ,quot; zm.datquot; );<br /> fp=fopen(quot; zm.datquot; ,quot; rb+quot; );<br /> printf(quot; DO U WANT TO DELETE ANOTHER RECORD[y/n]quot; );<br /> fflush(stdin);<br /> cAns=getche();<br /> }<br /> break;<br /> case '5':<br /> fclose(fp);<br /> goto e;<br /> }<br /> }<br /> }<br /> }<br />