nikolas_serafini

Lista 2 - Exercício 15

May 25th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int a,b,c;
  7.  
  8.     printf("Insira tres valores :\n"); scanf("%f %f %f",&a,&b,&c);
  9.     if ((a>b)&&(a>c))
  10.     {
  11.         printf("O primeiro numero eh o maior!\n");
  12.         return 0;
  13.     }
  14.     if ((b>a)&&(b>c))
  15.     {
  16.         printf("O segundo numero eh o maior!\n");
  17.         return 0;
  18.     }
  19.     if ((c>a)&&(c>b))
  20.     {
  21.         printf("O terceiro numero eh o maior!\n");
  22.         return 0;
  23.     }
  24.     else printf("Inexiste apenas um numero maior!!\n");
  25.  
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment