Advertisement
emmit

Atividade de Sidney

Aug 4th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. /* Elabora um algorΓ­timo que leia 3 valores e diga qual maior*/
  2.  
  3. #include <stdio.h>
  4. #include <conio.h>
  5.  
  6. int main(){
  7.  
  8.     int num[2];
  9.  
  10.     scanf("%i %i %i", &num[0], &num[1], &num[2]);
  11.  
  12.     int i, maior;
  13.     for(i=0; i<3; i++){
  14.  
  15.        
  16.         if(num[i] >= num[i+1]){
  17.  
  18.             maior=num[i];
  19.  
  20.         }
  21.  
  22.     }
  23.  
  24.     printf("%d", maior);
  25.    
  26.     return 0;
  27.     getch();
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement