Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.70 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. main(){
  4.    
  5.  int  a,b,c,max;    
  6.  
  7.  printf("entez a = ");
  8.  scanf("%d",&a);
  9.  printf("entez b = ");
  10.  scanf("%d",&b);
  11.  printf("entez c = ");
  12.  scanf("%d",&c);
  13.  
  14.  max = c ;
  15.  
  16.  if( a > b && a > c ) {
  17.      
  18.     max = a;
  19.      
  20.  }
  21.  if( b > a && b > c) {
  22.      
  23.     max = b;
  24.      
  25.  }
  26.  
  27.  
  28.  printf("le plus grande valeur de a , b et c est : %d \n\n",max);
  29.  
  30.  if( a > b && a > c ) {
  31.      
  32.   printf("le plus grande valeur de a , b et c est a = %d \n\n",a);
  33.      
  34.  }else if( b > a && b > c) {
  35.      
  36.   printf("le plus grande valeur de a , b et c est b = %d \n\n",b);
  37.      
  38.  }else{
  39.      
  40.   printf("le plus grande valeur de a , b et c est c = %d \n\n",c);
  41.  
  42.  }
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement