samedi 11 mai 2013

ha waahed lprograam mafhaamto ach taydiir ; li fhaam yfiidnaa ,,, hhhhhhh


#include <stdio.h>
#include <stdlib.h>
void lecture(int &x,int &y)
{
     printf(" le premier enier :");
      scanf("%d",&x);
      printf(" le deuxiéme enier :");
      scanf("%d",&y);
}
void echange(int &x,int &y)
{
  int  p;
  p=x;
  x=y;
  y=p;
  printf("la valeur de premier entier à l'intérieur de la fonction est %d\n",x);
  printf("la valeur du deuxieme entier à l'intérieur de la fonction est %d\n",y);

}
void max(int x,int y,int &m)
{
    if(x>y)
      m=x;
    else
      m=y;
      printf("le maximum à l'interieur :%d\n",m);
}
main()
{
      int a,b,c;
      lecture(a,b);
      echange(a,b);
      printf("le premier entier apres la fonction:%d\n",a);
      printf("le deuxieme entier apres la fonction:%d\n",b);
      max(a,b,c);
      printf(" le maximume est=%d\n",c);
      system("pause");
}