Advertisement
Guest User

Untitled

a guest
Sep 20th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.92 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main ()
  4.  
  5. {
  6.         int Nb1,Nb2,Nb3;
  7.         printf("Saisir le premiere valeur:\n");
  8.         scanf("%d",&Nb1);
  9.  
  10.         printf("Saisir la deuxieme valeur:\n");
  11.         scanf("%d",&Nb2);
  12.  
  13.         printf("Saisir la troisieme valeur:\n");
  14.         scanf("%d",&Nb3);
  15.  
  16.  
  17.  
  18.                 /*--------------------------------*/
  19.  
  20.  
  21.         if ((Nb1>Nb2)&&(Nb2<Nb3))
  22.         {
  23.                 printf("Le nombre le plus grand est:%d",Nb1);
  24.         }
  25.         else if ((Nb1<Nb2)&&(Nb2>Nb3))
  26.                 {
  27.                         printf("Le nombre le plus grand est:%d",Nb2);
  28.                 }
  29.  
  30.         else if ((Nb3>Nb2)&(Nb1<Nb3))
  31.                 {
  32.                                 printf("le nombre le plus grand est:%d",Nb3);
  33.                 }
  34.         else
  35.                 {
  36.                                 printf("les nombre sont tous egaux :%d",Nb1);
  37.                 }
  38.  
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement