Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main(){
- int idCliente, idTorta;
- int mCanTorta[10][3]={};
- cout<<"cliente: ";
- cin>>idCliente;
- while(idCliente >= 0){
- cout<<"torta: ";
- cin>>idTorta;
- mCanTorta[idCliente-1][idTorta-1]++;
- cout<<"cliente: ";
- cin>>idCliente;
- }
- for(int f = 0; f < 10; f++){
- for(int c = 0; c < 3; c++){
- cout<<mCanTorta[f][c]<<"\t";
- }
- cout<<endl;
- }
- for(int f = 0; f < 10; f++){
- for(int c = 0; c < 3; c++){
- if(mCanTorta[f][c]>1){
- cout<<f+1<<endl;
- }
- }
- cout<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment