Accueil > Forum > > > > projet gestion de personel
projet gestion de personel
mercredi 2 mai 2007 à 07:21:43 |
projet gestion de personel

ahmeddrira
|
drira ahmed
svp les amis aidez moi a c
o
riger ce programe c est mon projet de fin d etude c est petit mais il m a causer beaucoup de prob voisi le code source svp pas de complication
#include<stdio.h> #include<string.h> #include<econio.h> #include<econio.cpp> #include<conio.h> FILE *fp; char nonsauv[10], /**np[999]={"ahmed drira","ali jaber","bilel","mohamed ali","ahmed","bilel amar"},*/ch1[20],*p1,*p2,/*cod[999]={"e25","e25","c20","e20","c10","c20"},ch2[20],*/ch3[20],*tempe[999][8]; int choix,ok,x,y,k,h,a,i,j,n ,salaire,id,/*date[999][3]={{3,3,2000},{5,5,1987},{5,8,9871},{6,5,1980},{5,6,2000},{20,3,1987}},*/choi,jour=0,moi=0,anne=0,/*ident[999]={1,2,3,4,5,6},nb[999]={0,1,0,2,0,0},*/temp; char tape; //************************************** typedef struct employe//**** {char *np,*cod; //**** int date[3]; //****//structur employeé int ident,nb;}employ; //**** employ tab[999]; //****//tableua de type structure qui contien tous les employeé //*********************************************************************************************** //*********************************************************************************************** void enregistrer() //** { do{ //** fp=fopen("c:\\fich.txt","a+");}while(!fp); //** //**//fonction d enregistrement for(j=0;j<i;j++) //** {fwrite(&tab[i],sizeof(employ),1,fp);} //** }/////////////////////////////////////////////////*** void menu()//fonction menu {textcolor(BLUE);textbackground(YELLOW); clrscr(); gotoxy(15,8);printf("\t\t\t\tMENU"); gotoxy(20,10); printf("1)AJOUTER UNE PERSONNE DANS LE TABLEAU"); gotoxy(20,12); printf("2)AJOUTER LES ENFANTS D UNE PERSONNE"); gotoxy(20,14); printf("3)SUPRIMER UNE PERSONNE DE LA LISTE"); gotoxy(20,16); printf("4)CONSULTER OU AFFICHERLES PERSONNES"); gotoxy(20,18); printf("5)CHERCHER UNE PERSONNE PAR SON NON OU SON PRENOM3"); gotoxy(20,20); printf("6)AFICHER LES INFORMATION SUR UNE PERSONNE"); gotoxy(20,22); printf("7)RETOURNER LE NON DE PERE OU DE MERE D UNE PERSONNE"); gotoxy(20,24); printf("8)RETOURNER L AGE D UNE PERSONNE"); gotoxy(20,26); printf("9)CALCULER LE SALAIRE"); gotoxy(20,28); printf("10)MODIFIER LES INFORMATION D UNE PERSONNE"); gotoxy(20,30); printf("11)TRIER LA LISTE DES PERSONNES\n\n");
printf("entrer un choix \t"); do{scanf("%d",&choix); if(choix<1||choix>11) printf("choix invalide"); }while(choix<1||choix>11);// VALIDITé DU CHOIx }//*********************************************************************************************** //*********************************************************************************************** void ajoutpersonne()//ajout personne et leur enfant { printf("vous avez choisie d ajouter une personne\n\n"); i++;//incrimentation du nombre de personne printf("ENTRER LE NON / LE PRENOM DE LA PERSONNE A AJOUTER\n"); do{fflush(stdin);gets(ch1);
for(p1=ch1;p1<ch1+strlen(ch1);p1++)//test si le non prenom entrer son séparé par un espace {ok=0;if(isspace(*p1)!=0) {ok++;break;}}//** if(ok!=1) printf("le nom prenom entrer contien plus qu un espace ou ne contien pas "); else {(tab[i].np)=(char*)malloc(strlen(ch1)*sizeof(char)); strcpy(tab[i].np,ch1);}}while(ok!=1);
printf("entrer la date de naissance de cette personne jour/moi/ann\202\n"); do{printf("entrer le jour\t");//test sur la validité de la date fflush(stdin); scanf("%d",&jour); printf("entrer le moi\t"); scanf("%d",&moi); printf("entrer l ann\202\t"); scanf("%d",&anne);} while((jour>31||jour<1||moi<1||moi>12)||anne>1990||anne<1947||((moi==4||moi==6||moi==8||moi==9||moi==11)&&jour==31)||((moi==2)&&(anne%4==0)&&(jour>28))||((moi==2)&&(anne%4!=0)&&(jour>29))) ; //affectation tab[i].date[0]=jour;// tab[i].date[1]=moi;//****affection tab[i].date[2]=anne;// printf("entrer l identifiant de cet personne de la forme <<xxxx>>\t"); do{scanf("%d",&tab[i].ident); if(tab[i].ident>999||tab[i].ident<0) printf("\aidentifiant invalide");} while(tab[i].ident>999||tab[i].ident<0);//test sur l identifiant printf("entrer le code <<GRADE/NOMBRE D HEURE DE TRAVAIL>>\t"); do{ok=0;gets(ch1); if((*ch1=='e'||*(ch1)=='c')&&isdigit(*(ch1+1))!=0&&isdigit(*(ch1+2))!=0) ok=1;}while(ok==0);// test sur entrer du cod caractere /entier tab[i].cod=ch1; printf("entrer le nombre d enfant de cet personne qui travaille dans la societ\202"); do{scanf("%d",&tab[i].nb); }while(tab[i].nb<0||tab[i].nb>8);
x=tab[i].nb; for(j=0;j<x;j++) {printf("entrer les non des enfant de cet personne\n");fflush(stdin); i++; printf("entrer le non de l enfant numero %d \t",j+1); fflush(stdin);gets(ch1); tab[i].np=(char*)malloc(strlen(ch1)*sizeof(char)); strcpy(tab[i].np,ch1); printf("\nentrer sa date de naissance\n\n");
do{printf("entrer le jour\t");//test sur la validité de la date fflush(stdin); scanf("%d",&jour); printf("entrer le moi\t"); scanf("%d",&moi); printf("entrer l ann\202\t"); scanf("%d",&anne);} while((jour>31||jour<1||moi<1||moi>12)||anne>1990||anne<1947||((moi==4||moi==6||moi==8||moi==9||moi==11)&&jour==31)||((moi==2)&&(anne%4==0)&&(jour>28))||((moi==2)&&(anne%4!=0)&&(jour>29))) ; //affectation tab[i].date[0]=jour; tab[i].date[1]=moi; tab[i].date[2]=anne;
printf("entrer l identifiant de cet personne\t"); do{fflush(stdin);scanf("%d",&tab[i].ident); if(tab[i].ident>999||tab[i].ident<0) printf("identifiant invalide");} while(tab[i].ident>999||tab[i].ident<0);//test sur l identifiant printf("entrer le code <<GRADE/NOMBRE D HEURE DE TRAVAIL>>\t"); do{ok=0;gets(ch1); if((*ch1=='e'||*(ch1)=='c')&&isdigit(*(ch1+1))!=0&&isdigit(*(ch1+2))!=0) ok=1;}while(ok==0);// test sur entrer du cod caractere /entier tab[i].cod=ch1; tab[i].nb=0; } }
///*********************************************************************************************** //*********************************************************************************************** void ajoutenfant() {do{ fp=fopen("c:\\fich.txt","a+");}while(!fp);
printf("vous avez choisie d ajouter les enfant d une personne\n\n"); printf("entrer l identifiant de la personne a ajouter les enfant\t"); do{ok=0; scanf("%d",&id); for(j=0;j<i;j++) {if(id==(tab[j].ident)) {ok=1;break;}} }while(ok==0); printf(" lidentifiant entrer est celui de %s ",tab[j].np); printf("entrer le nombre d enfant a ajouter\t"); do{scanf("%d",& n);}while(((tab[j].nb)+n)<8); for(h=0;h<n;h++) {for(k=i;k>j;k++) { tab[k+1].np=tab[k].np; //tab[k+1].np=tab[k].np; tab[k+1].nb=tab[k].nb;////////////** tab[k+1].date[0]=tab[k].date[0];//** tab[k+1].date[1]=tab[k].date[1];//**affectation tab[k+1].date[2]=tab[k].date[2];//** tab[k+1].ident=tab[k].ident;//////** tab[k+1].cod=tab[k].cod;}/////////**
}
for(k=tab[j].nb;k<(tab[j].nb)+n;k++) {i++; printf("ajouter le non de l enfant numero %d",k+1); gets(ch1); tab[i].np=(char*)malloc(strlen(ch1)*sizeof(char)); strcpy(tab[i].np,ch1);
tab[j].nb+=n; }
}
//*********************************************************************************************** //*********************************************************************************************** void suprimer() {printf(" vous avez choisie de suprimer une personne"); printf("entrer l identiant de la personne a suprimer"); do{ok=0; scanf("%d",&id); for(j=0;j<i;j++) {if(id==tab[j].ident) {ok=1;break;}} }while(ok==0); printf(" lidentifiant entrer est celui de %s ",tab[j].np); for(k=j;k<i;k++)//*****décalage apré supression les information {tab[k].np=tab[k+1].np; tab[k].nb=tab[k+1].nb; tab[k].date[0]=tab[k+1].date[0]; tab[k].date[1]=tab[k+1].date[1]; tab[k].date[2]=tab[k+1].date[2]; tab[k].ident=tab[k+1].ident; tab[k].cod=tab[k+1].cod;
}
}
//*********************************************************************************************** //*********************************************************************************************** void consulter() {printf("vous avez choisi de consulter ou afficher les personnes\n"); printf("entrer l identiant de la personne a consulter\t"); do{ok=0; scanf("%d",&id); for(j=0;j<i;j++) {if(id==tab[j].ident) {ok=1;break;}} }while(ok==0); //*****afichage de tout les information£££££££££££££££££££££££££
printf(" lidentifiant entrer est celui de %s \n ",tab[j].np); printf("date de naissance:\t%d/%d/%d\n",tab[j].date[0],tab[j].date[1],tab[j].date[2]); printf("son code est :\t%s\n",tab[j].cod); printf("nombre d enfantqui travaille dans la soci\202t\202:\t%d",tab[j].nb); if(tab[j].nb>0) {for(h=j;h<(tab[j].nb)+j;h++) {printf("lenfant numero %d s apelle %s",h+1,tab[h].np);}}//*****
}
void recherche() {printf("vous avez choisi de chercher une personne par son non ou pr\202nom\n"); printf(" entrer le non et prenom de la personne a re chercher\t");fflush(stdin); gets (ch1); for(j=0;j<i;j++) {if(strcmp(tab[j].np,ch1)==0) {ok=1; printf(" la personne a rechercher existe \n\n\n"); printf("sa date de naisance est %d/%d/%d\n",tab[j].date[0],tab[j].date[1],tab[j].date[2]); printf(" son identifian est %d\n ",tab[j].ident); printf("son code est %s \n",tab[j].cod); printf("nombre d enfant = %d \n",tab[j].nb); if(tab[j].nb>0) {for(k=j+1;k<j+1+tab[j].nb;k++) {printf("l enfant %d s appelle %s \n",k-j,tab[k].nb);} }break;
}//fin if
}//fin for if(ok==0)
printf("le non entrer n existe pas"); } //*********************************************************************************************** //*********************************************************************************************** void age() {printf("vous avez choisie de retourner l age d une personne\n");
printf("entrer l identiant de la personne a retourner l age\t"); do{ok=0;fflush(stdin); scanf("%d",&id); for(j=0;j<i;j++) {if(id==tab[j].ident) {ok=1;break;}} }while(ok==0); printf(" lidentifiant entrer est celui de %s \n ",tab[j].np); printf("entrer la date aujourd hui jour/moi/ann\202\n"); do{printf("entrer le jour\t"); fflush(stdin); scanf("%d",&jour); printf("entrer le moi\t"); scanf("%d",&moi); printf("entrer l ann\202\t"); scanf("%d",&anne);} while((jour>31||jour<1||moi<1||moi>12)||((moi==4||moi==6||moi==8||moi==9||moi==11)&&jour==31)||((moi==2)&&(anne%4==0)&&(jour>28))||((moi==2)&&(anne%4!=0)&&(jour>29))) ; if(moi-tab[j].date[1]<0) {x=anne-tab[j].date[2]-1; y=12+(moi-tab[j].date[1]);}
printf("l age de cet personne a %d ann\202 et %d moi ",x,y);
} void salaireper() {printf("vous avez choisi de retourner le salaire d une personne"); printf("entrer l identiant de la personne a retourner le salaire\t"); do{ok=0;fflush(stdin); scanf("%d",&id); for(j=0;j<i;j++) {if(id==tab[j].ident) {ok=1;break;}} }while(ok==0); printf(" lidentifiant entrer est celui de %s \n ",tab[j].np); printf("son code est %s :\t",tab[j].cod); strcpy(ch1,tab[j].cod); if(*ch1=='e') salaire=(1750*(((*(ch1+1)-48)*10)+(*(ch1+2)-48)))*4;//convertion from char to in et calcul de salair else salaire=(3450*(((*(ch1+1)-48)*10)+(*(ch1+2)-48)))*4;// """"""""""""""""""""""""""""""""""""""""""""
printf("cet employe\202 a pour salair [%d]milimes", salaire); getch();} //************************************************************************************************** //*************************************************************************************************** void infopere() { printf("vous avez choisie de retourner les informations sur les enfants d une personne\n"); printf("entrer l identiant de la personne a retourner les information sur les enfants\t"); do{ok=0; scanf("%d",&id); for(j=0;j<i;j++) {if(id==tab[j].ident) {ok=1;break;}} }while(ok==0); printf(" lidentifiant entrer est celui de %s \n ",tab[j].np);
if(tab[j].nb==0) printf("cet personne ne posede pas d enfant"); else{
for(h=j+1;h<(tab[j].nb+j+1);h++) {printf("lenfant numero %d s apelle %s",h-j,tab[h].np);} }
} //*************************************************************************************************** //**************************************************************************************************** void retourinfo() {printf("vous avez choisie de modifier les information d une personne"); printf("entrer l identifiant de la personne a modifier l informations"); do{ok=0; scanf("%d",&id); for(j=0;j<i;j++) {if(id==tab[j].ident) {ok=1;break;}} }while(ok==0); printf(" lidentifiant entrer est celui de %s \n ",tab[j].np); printf(" choisisez le nuùero de l information a modifier\n"); men: printf("\t\t\t1)non et prenom\n"); printf("\t\t\t2)date de naisance\n"); printf("\t\t\t3)identifiant\n"); printf("\t\t\t4)nombre d enfant\n"); printf("\t\t\t5)non des enfants\n"); printf("\t\t\t6)code\n"); scanf("%d",&choi); switch(choi) {case 1:{printf("\nvous avez choisie de modifier le non pr\202nom");
fflush(stdin); gets(ch1);tab[j].np=(char*)malloc(strlen(ch1)*sizeof(char)); strcpy(tab[j].np,ch1); printf(" non modifiez\n"); printf("\napuiez sur une touche pour passer au menue\n"); getch(); goto men; break;} case 2:{printf("vous avez choisi de modifier la date de naissance"); printf("la date de naissance de l identifiant entrer est "); printf("%d/%d/%d",tab[j].date[0],tab[j].date[1],tab[j].date[2]); printf("entrer la nouvelle date"); do{printf("entrer le jour\t"); fflush(stdin); scanf("%d",&jour); printf("entrer le moi\t"); scanf("%d",&moi); printf("entrer l ann\202\t"); scanf("%d",&anne);} while((jour>31||jour<1||moi<1||moi>12)||((moi==4||moi==6||moi==8||moi==9||moi==11)&&jour==31)||((moi==2)&&(anne%4==0)&&(jour>28))||((moi==2)&&(anne%4!=0)&&(jour>29))) ; tab[j].date[0]=jour; tab[j].date[1]=moi; tab[j].date[2]=anne; printf("\napuiez sur une touche pour passer au menue\n"); getch(); goto men; } case 3:{printf("vous avez choisi de modifier l identifiant"); printf("entrer le nouveau identifian"); fflush(stdin);scanf("%d",&tab[j].ident); printf("\napuiez sur une touche pour passer au menue\n"); getch(); goto men; } case 4:{printf("vous aver choisi de modifier le nombre d enfant\n"); printf("entrer le nouveau nombre de enfant \t"); scanf("%d",&ok); if(ok>tab[j].nb) {for(h=0;h<ok-tab[j].nb;h++) { for(k=i;k>j;k--) {tab[k+1].np=tab[k].np; tab[k+1].np=tab[k].np; tab[k+1].nb=tab[k].nb; tab[k+1].date[0]=tab[k].date[0]; tab[k+1].date[1]=tab[k].date[1]; tab[k+1].date[2]=tab[k].date[2]; tab[k+1].ident=tab[k].ident; tab[k+1].cod=tab[k].cod; //decalage pour ajouter les enfants x=j; printf("entrer le non de l enfant numero %d",h+1); fflush(stdin);gets(ch1); tab[x+1].np=(char*)malloc(strlen(ch1)*sizeof(char)); strcpy(tab[x+1].np,ch1); x++; }} }//fin de if else if(ok<tab[j].nb) {printf("vous avez duminuez le nombre d enfant\n"); printf("vous devez ajuster les non des enfant qui travaille dans la societ\202\n"); printf("lidentifiant du pere ou mere est %d",tab[j].ident); } printf("\napuiez sur une touche pour passer au menue\n"); getch(); goto men; }//***fin case 4 case 5:{printf("vous avez choisi de modifier les nons des enfants\n"); printf("l identifiant de la personne choisie possede %d enfant\n",tab[j].nb); for(h=j;h<=(j+tab[j].nb);h++) printf( "%d)%s",tab[h].ident,tab[h].np); do{ printf("entrerle numero que vous voulez modifiez le non"); fflush(stdin);scanf("%d",&ok);fflush(stdin); gets(ch1);tab[j+ok].np=(char*)malloc(strlen(ch1)*sizeof(char));strcpy(tab[j+ok].np,ch1); printf("non modifier"); printf("si vous voulez changer un autr non tapez 1"); scanf("%c",&tape);} while(tape=='1');
printf("\napuiez sur une touche pour passer au menue\n"); getch(); goto men; } case 6:{printf("vous avez choisi de modifier le code de cet employ\202\n"); printf("entrer le nouveau cod\t"); do{ok=0;gets(ch1); if((*ch1=='e'||*(ch1)=='c')&&isdigit(*(ch1+1))!=0&&isdigit(*(ch1+2))!=0) ok=1;}while(ok==0); tab[j].cod=ch1; }printf("\napuiez sur une touche pour passer au menue\n"); getch(); goto men;
}
getch();} //***************************************************************************************************+ //**************************************************************************************************** void trie() {printf("vous avez choisie de trier la liste\n"); for(h=0;h<i;h++) {for(k=h;k<i;k++) {if(strcmp(tab[h].np,tab[k].np)>0)//**********permutation {strcpy(ch1,tab[h].np); tab[h].np=(char*)malloc(strlen(tab[k].np)*sizeof(char)); strcpy(tab[h].np,tab[k].np); tab[k].np=(char*)malloc(strlen(ch1)*sizeof(char)); strcpy(tab[k].np,ch1);
printf("********");
jour=tab[h].date[0];tab[h].date[0]=tab[k].date[0];tab[k].date[0]=jour; moi=tab[h].date[1];tab[h].date[1]=tab[k].date[1];tab[k].date[1]=moi; anne=tab[h].date[2];tab[k].date[2]=tab[h].date[2];tab[h].date[2]=anne;
temp=tab[h].ident; tab[h].ident=tab[k].ident; tab[k].ident=temp;
temp=tab[h].nb;tab[h].nb=tab[k].nb;tab[k].nb=temp; strcpy(ch1,tab[h].cod); tab[h].cod=(char*)malloc(strlen(tab[k].cod)*sizeof(char)); strcpy(tab[h].cod,tab[k].cod); tab[k].cod=(char*)malloc(strlen(ch1)*sizeof(char)); strcpy(tab[k].cod,ch1);
}//***fin du if
}//**fin du for du k
}//fin du for du h } void main() {printf("\t\t\t\tBIEN VENUE\n\n\n"); printf("SI VOUS VOULEZ OUVRIR UNE SAUVGARDE TAPEZ [s] \n\nSINON TAPEZ [n] POUR CREE UNE NOUVELLE SAUVGARDE\t"); do{scanf("%c",&tape);}while(tape!='n'&&tape!='s'); if(tape=='s') {do{fp=fopen("c:\\fich.txt","r");}while(!fp);//ouverture du fichier en mode lecture for(i=0;(!feof(fp));i++)//***test sur la fin du fichier {fread(&tab[i],sizeof(employ),1,fp);}//copie de continue du fichier dans le programe(mémoire) fclose(fp);//fermuture du programe if(!i)printf("votre suavgarde n existe pas!!\n\n vous avez cre\202 une nouvelle sauvgarde\n"); printf("Appuiez sur une touche pour commensez\n"); getch();
}
do{menu: menu(); //*********************************************************************************************** //*********************************************************************************************** if(choix==1) {clrscr(); do{ ajoutpersonne();
printf("si vous voulez quitter tapez 'q'\nsivous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez ajouter un autre personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1); enregistrer(); } else if(tape=='m') goto menu; }while(tape=='a');}//fin (1) else //****************************************************************************************** //****************************************************************************************** if(choix==2)
{do{ajoutenfant(); printf("si vous voulez quitter tapez 'q'\nsivous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez ajouter les enfants d une autre personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu; }while(tape!='a');
}//***fin du if 2
//**fin du elese 1 //*********************************************************************************************** //*********************************************************************************************** else if(choix==3) {do{suprimer(); printf("si vous voulez quitter tapez 'q'\nsivous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez suprimer une autre personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a');}//**fermuture du if 3
//***fin else 3 //*********************************************************************************************** //*********************************************************************************************** else
if(choix==4) {do{consulter(); printf("\n\n si vous voulez quitter tapez 'q'\nsivous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez consulter une autre personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a');
}//*****fin if 4
//*********************************************************************************************** //*********************************************************************************************** else if(choix==5) {do{recherche();
printf("\n\n si vous voulez quitter tapez 'q'\nsivous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez chercherun autre personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a');
}//***fin du if 5 //*********************************************************************************************** //*********************************************************************************************** else if(choix==6) {do{consulter(); printf("\n\n si vous voulez quitter tapez 'q'\nsivous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez retourner les informations sur les enfants d une personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a');
}//*fin if choix 6 //*********************************************************************************************** //*********************************************************************************************** else if(choix==7) {do{infopere(); printf("vous avez choisi de retourn\202 le non de pere ou de mere d une personne"); printf("entrer le non de lenfant<<seulement le non>>"); fflush(stdin); do{gets(ch1);ok=0; for(j=0;j<i;j++)
{if(strcmp(ch1,tab[j].np)==0) {ok=1; break;} }//**fin for if(ok==0) printf("ce non n existe pas");}while(ok==0); for(h=j-1;tab[h].nb!=0;h--);
printf("cet enfant est celui de <<%s>>",tab[h].np);
printf("\n\n si vous voulez quitter tapez 'q'\n si vous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez retourner le non de pere ou de mere d un enfant tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a');
}//****fin choi 7 //*********************************************************************************************** //*********************************************************************************************** else if(choix==8) {do{age(); printf("\n\n si vous voulez quitter tapez 'q'\nsivous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez retourner l age d une personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a'); }//**fin choix 8 //*********************************************************************************************** //*********************************************************************************************** else if(choix==9) {do
{salaireper();
printf("\n\n si vous voulez quitter tapez 'q'\n si vous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez retourner le salaire d une personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();}
}while(tape!='a');
}//**fin choi 9 else if(choix==10) {do{retourinfo(); printf("\n\n si vous voulez quitter tapez 'q'\n si vous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez modifiez les information d une autre personne tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a');
}//****fin choix 10
//*********************************************************************************************** //*********************************************************************************************** else if(choix==11) {do{clrscr();trie(); printf("\n\n si vous voulez quitter tapez 'q'\n si vous voulez revenir au menu tapez 'm'\n"); printf("si vous voulez trier une autre foix tapez 'a'\n"); do{scanf("%c",&tape);}while(tape!='a'&&tape!='q'&&tape!='m'); if(tape=='q') {exit(-1);enregistrer();} else if(tape=='m') goto menu;
}while(tape!='a');
}//****fin de if choix 11
}while(tape=='m');
}///*********************************************************************************************** //*********************************************************************************************** //*************************************************************************************************
|
|
mercredi 2 mai 2007 à 21:22:20 |
Re : projet gestion de personel
|
Cette discussion est classée dans : date, ch1, printf, tab, tape
Répondre à ce message
Sujets en rapport avec ce message
Problem Affichage de mon Tableau [ par Orezza ]
salut à tous, j'ai un blem à l'affichage du tableau. l'utilisateur parametre son tableau, c lui qui l'initilize mais j'arrive pas à afficher apres le
Blem Somme ELmt d'un Tableau Bidimensionnel [ par Orezza ]
Slt c encore moi, le boulet de l'info...c tjrs le meme prog mais cette fois ci j'aimerais afficher la somme des elmts de mon tableaux.#include #includ
tableau unidimensionnel .... [ par slowlover ]
j'ai fais un tableau unidimensionnel dont voici l'algorithme:#includeint main(){//declarationsfloat tab[10];int i;for(i=0;i{printf("entrez la valeur %
probleme en langage C - URGENT!!!!! [ par mazo0012 ]
bonjourjai un gros pb en C, si quelq'un pouvait m'aider apidement je commence a devenir dingue!!!!!!jexplike:tout simplement, j'essaye de saisir le ch
lecture/écriture fichier binaire [ par SesechXP ]
Salut !J'ai un programme modulaire à faire en C sous Borland C++ 5 pour un TP dont la fonction principale est donnée et je dois faire les différentes
pb en c urgenttttttttttttttttt [ par natacha86 ]
bonjour, j'ai un probleme avec mon programme, il ne veut pas sortir, j'ai fais un menu et apparement ya un bug mais je ne comprend rien.le code est as
encore un pb en c svp....... [ par natacha86 ]
j'ai essayer de séparer les fonctions mais ca ne marche pas...#include #include #include #include #include #define MAX 1000000
a l aiiiiiiiiidddddeeeeeeeee [ par natacha86 ]
je ne comprend pas pkoi le programme une fois qu'il a lancé le premier choix du menu a la fin il ne reviens pas au menu, il s'arrete directement, merc
menu avec un switch [ par natacha86 ]
je ne comprend pas pkoi le programme une fois qu'il a lancé le premier choix du menu a la fin il ne reviens pas au menu, il s'arrete directement, merc
aide par rapport a l'appel d'une méthode [ par natacha86 ]
quel est le probleme de ma méthode init_tab ? le programme s'arrete aprse etre passé dans cette méthode, il plante, et ne rentre pas dans la méthode d
Livres en rapport
|
Derniers Blogs
POUR RAPPEL ! LES SPéCIFICATIONS DES PROTOCOLES OFFICE ET SHAREPOINT SONT DISPONIBLES SUR MSDNPOUR RAPPEL ! LES SPéCIFICATIONS DES PROTOCOLES OFFICE ET SHAREPOINT SONT DISPONIBLES SUR MSDN par neodante
Quelle est le point commun entre : Microsoft il y a 10 ans et Apple aujourd'hui ? Réponse: avoir une politique de protocoles propriétaires et fermés :) Car pour rappel (si si je vous assure c'est important de le rappeler), la majorité des spécifications e...
Cliquez pour lire la suite de l'article par neodante JOYEUX ANNIVERSAIRE NIXJOYEUX ANNIVERSAIRE NIX par ebartsoft
Souhaitons un bon et joyeux anniversaire à notre hôte à tous, Nix.
Je ne le répéterais jamais assez mais sans lui rien ne serait possible. Il défit en permanence les lois de la gravité et comme il le dit si bien, si tu lui fais confiance ça devra...
Cliquez pour lire la suite de l'article par ebartsoft IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc
Forum
MATLAB PROGRAMME MATLAB PROGRAMME par wahab1087
Cliquez pour lire la suite par wahab1087 RGB2GRAYRGB2GRAY par musa18
Cliquez pour lire la suite par musa18
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|