Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int variedade_produtos = 0,s loja_pobre = 0, soma_produtos[7], lojas_produtos[7][5] = {
  5. {12, 24, 48, 89, 1},
  6. {23, 45, 57, 78, 8},
  7. {11, 87, 43, 79, 5},
  8. {13, 29, 12, 30, 9},
  9. {15, 23, 67, 69, 5},
  10. {17, 45, 76, 54, 4},
  11. {10, 54, 87, 45, 7}
  12. };
  13. printf("LOJA P1 P2 P3 P4 P5\n");
  14.  
  15.  
  16. for(int i = 0; i < 7; i++){
  17. printf(" %d ", (i +1));
  18. for(int j = 0; j < 5; j++){
  19. soma_produtos[i] += lojas_produtos[i][j];
  20. printf("%d ", lojas_produtos[i][j]);
  21. }
  22. printf("\n");
  23. }
  24.  
  25. for(int i = 1; i < ; i++){
  26. if(soma_produtos[i - 1] <= soma_produtos[i]){
  27.  
  28. }
  29. }
  30.  
  31. printf("A loja que possui menos produtos eh a %d\n", loja_pobre);
  32.  
  33. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement