Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int variedade_produtos = 0,s loja_pobre = 0, soma_produtos[7], lojas_produtos[7][5] = {
- {12, 24, 48, 89, 1},
- {23, 45, 57, 78, 8},
- {11, 87, 43, 79, 5},
- {13, 29, 12, 30, 9},
- {15, 23, 67, 69, 5},
- {17, 45, 76, 54, 4},
- {10, 54, 87, 45, 7}
- };
- printf("LOJA P1 P2 P3 P4 P5\n");
- for(int i = 0; i < 7; i++){
- printf(" %d ", (i +1));
- for(int j = 0; j < 5; j++){
- soma_produtos[i] += lojas_produtos[i][j];
- printf("%d ", lojas_produtos[i][j]);
- }
- printf("\n");
- }
- for(int i = 1; i < ; i++){
- if(soma_produtos[i - 1] <= soma_produtos[i]){
- }
- }
- printf("A loja que possui menos produtos eh a %d\n", loja_pobre);
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement