منتديات العمارية
لبسم الله
salaùm
اهلا وسهلا بك عزيزي الزائرفي منتدى العمارية هذه الرسالة تبين انك غير مسجل معنا الرجاء التسجيل للأستفادة منكم ..؟؟ وان كنت مسجل من قبل فالرجاء تسجيل الدخول
Basketball Basketball Basketball جزاك الله كل خير

مع التحية al@dfg وردة وردة وردة



انضم إلى المنتدى ، فالأمر سريع وسهل

منتديات العمارية
لبسم الله
salaùm
اهلا وسهلا بك عزيزي الزائرفي منتدى العمارية هذه الرسالة تبين انك غير مسجل معنا الرجاء التسجيل للأستفادة منكم ..؟؟ وان كنت مسجل من قبل فالرجاء تسجيل الدخول
Basketball Basketball Basketball جزاك الله كل خير

مع التحية al@dfg وردة وردة وردة


منتديات العمارية
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.

اذهب الى الأسفل
avatar
souad hama
الجنس : انثى الجدي
عدد المساهمات : 36 نقاط التميز : 4872 تاريخ التسجيل : 14/02/2011 العمر : 34

ce tp de algo excecutable sure le programe c Empty ce tp de algo excecutable sure le programe c

الإثنين 4 أبريل - 14:21
#include


#include


#define max 20


typedef char chaine[max];


typedef struct {int jour;


char* mois;


int annee;}date;


typedef date* tab;








void affichefib ( int n)


{int x=1,y=1,z; int
i=2;


printf("%d %d", x,y);


for(i=3;i<=n;i++)


{z=x+y;


printf("%d", z);


x=y; y=z;}


}


char *allouer (int n)


{char *p=
(char*)malloc((n+1)*sizeof(char));


if(!p){printf("erreur");


exit(-1); }


return p;}


void affichemotfib ( int n)


{char *p1, *p2, *p3; char *x;


int i;


p1=allouer (1); p2= allouer (2);


p1[0]='b'; p1[1]='/0';


p2[0]='a'; p2[1]='/0';


printf("%s %s",p1, p2);


for(i=3;i<=n;i++)


{p3=allouer(strlen(p1)+strlen(p2));


strcpy(p3,p2);


strcat(p3,p1);


printf("%s",p3);


x=p1; p1=p2; p2=p3;


free(x);


}








}


date initDate (int j,char*
m,int a)


{date d;int k;


m=(char*)malloc(k*sizeof(char));


scanf("%d",&j);


scanf("%s",m);


scanf("%d",&a);


d.jour=j;


d.mois=m;


d.annee=a;


return d;


}


void afficherDate (date d)


{printf("la
date est:%d %s %d \n",d.jour,d.mois,d.annee);


}


int comparerDate (date
d1,date d2)


{while
((d1.jour

{if
(strcmp(d1.mois,d2.mois)==-1) return 1;


return 0;}


}


int verifie(int n,tab td)


{int i;


for(i=0;i

if
(comparerDate(td[i],td[i+1])==1) return 1;


return 0;


}


main()


{int N,i;tab A;int
jr;char*M;int an;int K;int v;


printf("donnez la
taille du tableau:\n");


scanf("%d",&N);


for(i=0;i

{printf("donez
la taille du mois \n");scanf("%d",&K);


A[i]=initDate(jr,M,an);}


for(i=0;i

{afficherDate(A[i]);}


v=verifie(N,A);


if (v==1) printf("le
tableau est triee par ordre croissant\n");


printf("le tableau
n'est pas triee par ordre croissant \n");


system("pause");


getchar();


getchar(); }
avatar
????
زائر

ce tp de algo excecutable sure le programe c Empty رد: ce tp de algo excecutable sure le programe c

الثلاثاء 7 يونيو - 17:17
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذه الصورة]
Rafik Almeria
Rafik Almeria
الجنس : ذكر الاسد
عدد المساهمات : 1581 نقاط التميز : 9072 تاريخ التسجيل : 19/05/2011 العمر : 102
https://www.youtube.com/user/rafikovic100

ce tp de algo excecutable sure le programe c Empty رد: ce tp de algo excecutable sure le programe c

الثلاثاء 5 يوليو - 9:36
win raha Return 0; aa
Don'TouCH me
Don'TouCH me
عدد المساهمات : 220 نقاط التميز : 5826 تاريخ التسجيل : 17/04/2009 الموقع : حومة كولمبية
http://www.google.com

ce tp de algo excecutable sure le programe c Empty رد: ce tp de algo excecutable sure le programe c

الخميس 9 أغسطس - 3:58
xD za3ma fe9t beli na9ssa return 0 ; xD return0; ydirouha ki tkoun, la fonction main de type int par exemple


int main (){
int a,b,v;
v=a+b;

ptintf(" LA valeur de la somme c'est %d ,v");

return 0;
}

dans ce ça la il utilison main(){


}

donc mandirouch return 0 ;

الرجوع الى أعلى الصفحة
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى