Advertisement
luizaspan

introfiscomp - lista1 - questao19

Apr 13th, 2015
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. // 19. Indicar o maior de 2 números
  2.  
  3. #include <stdio.h>
  4. #include <math.h>
  5.  
  6. int main(void)
  7. {
  8.  
  9.   double a,b;
  10.   printf("\nDigite dois numeros separados por espaço: ");
  11.   scanf("%lf %lf",&a,&b);
  12.  
  13.   if (a>b)
  14.     {
  15.  
  16.       printf("\nEntre %lf e %lf, o maior número é %lf.\n\n",a,b,a);
  17.  
  18.     }
  19.  
  20.   else
  21.     {
  22.  
  23.       printf("\nEntre %lf e %lf, o maior número é %lf.\n\n",a,b,b);
  24.  
  25.     }
  26.  
  27. }
  28.  
  29. // FUNCIONA!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement