Jvsierra

Ex proposto 3

Feb 12th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 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;
  7.  
  8.     printf("Digite o primeiro numero:\n");
  9.     scanf("%f", &n1);
  10.     printf("Digite o segundo numero:\n");
  11.     scanf("%f", &n2);
  12.  
  13.     if(n1 > n2){
  14.         printf("O segundo numero e o menor.\n");
  15.     }else if(n1 == n2){
  16.         printf("Os dois numeros sao iguais.\n");
  17.     }else{
  18.         printf("O primeiro numero e menor.\n");
  19.     }
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment