Advertisement
Guest User

Untitled

a guest
May 25th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #include <string.h>
  4.  
  5. int main ()
  6. {
  7.  
  8. int strpeso[5],strnum[5];
  9.  
  10. int j,maispesado, indif, ask;
  11.  
  12. for(j=0; j<5; j++){
  13.  
  14. printf(" Digite o número do boi %d\n",j);
  15.  
  16. scanf("%d",&strnum[j]);
  17.  
  18. printf(" Digite o peso do boi %d\n",j);
  19. scanf("%d",&strpeso[j]);
  20.  
  21. }
  22.  
  23. maispesado=0;
  24.  
  25. for(j=0; j==4; j++)
  26. {
  27.  
  28. if (maispesado <= strpeso[j])
  29. {
  30. maispesado=strpeso[j];
  31. indif = j;
  32.  
  33. }
  34.  
  35. }
  36. printf("Informações do boi mais pesado : %d\n,%d\n", maispesado,strnum[indif]);
  37. printf("Pronto! =D");
  38. scanf("%d",&ask);
  39.  
  40. return(0);
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement