Necesito ayuda quiero que mi programa imprima así
Ticket 1's guess is 6
Ticket 2's guess is 3
Ticket 3's guess is 4
Ticket 4's guess is 5
Ticket 5's guess is 5
Ticket 6's guess is 5
Ticket 7's guess is 4
Ticket 8's guess is 5
Ticket 9's guess is 6
Ticket 10's guess is 5
The winning number is 5
Ticket 4 is a winner
Ticket 5 is a winner
Ticket 6 is a winner
Ticket 8 is a winner
Ticket 10 is a winner
y mi programa solo me imprime un ganador cuando hay mas
este es mi codigo
#include<iostream>
#include<stdlib.h>
#include<time.h>
using namespace std;
int main(){
srand(time(NULL));
const int TICKET_COST=2;
int n_tickets=0,confirmacion,ganancias,perdidas;
double costo;
char compu;
cout<<"¿cuantos tickets va a comprar?\n";
cin>>n_tickets;
costo=n_tickets*TICKET_COST;
cout<<"ingrese "<<costo<<" para confirmar: ";
cin>>confirmacion;
while(confirmacion != costo){
cout<<"Re ingrese la confirmacion: ";
cin>>confirmacion;
}
cout<<"Gracias le descontaremos $"<<costo<<" de su tarjeta"<<endl;
int winner= 1+rand()%(11-1);
int guess=0;
int winCTR=0;
string out="";
cout<<"Si quiere que el computador genere los numeros ingrese Y en caso contrario ingrese N"<<endl;
cin>>compu;
if(compu=='Y' || compu=='y'){
int i=1;
while(i<=n_tickets){
guess=1+rand()%(11-1);
cout<<"ticket "<<i<<" guess es: "<<guess<<endl;
if(guess== winner){
winCTR++;
out= "ticket "+to_string(i)+" ganador";
//cout<<"ticket "<<i<<" es ganador"<<endl;
}
i++;
}
cout<<"el numero ganador es: "<<winner<<endl;
cout<<"***"<<out<<endl;
ganancias= winCTR*TICKET_COST*10;
perdidas=(n_tickets-winCTR)*TICKET_COST;
cout<<"su balance es $"<<(ganancias-confirmacion)<<endl;
}else if(compu=='N' || compu=='n'){
}else{
cout<<"Ingreso un valor invalido, cerrando el programa"<<endl;
cout<<"se le rembolsara $"<<costo<<" a su tarjeta"<<endl;
return 0;
}
return 0;
}