Jvsierra

Ex proposto 4

Feb 12th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(){
  5.  
  6.     float n1 = 0.0, n2 = 0.0, n3 = 0.0;
  7.  
  8.     printf("Digite o primeiro numero:\n");
  9.     scanf("%f", &n1);
  10.     printf("Digite o segundo numero:\n");
  11.     scanf("%f", &n2);
  12.     printf("Digite o terceiro numero:\n");
  13.     scanf("%f", &n3);
  14.  
  15.     if(n1 > n2 && n1 > n3){
  16.         printf("O primeiro numero e maior.\n");
  17.     }else if(n2 > n1 && n2 > n3){
  18.         printf("O segundo numero e maior.\n");
  19.     }else if(n3 > n1 && n3 > n2){
  20.         printf("O terceiro numero e maior.\n");
  21.     }
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment