0

I am selling numbers of lottery and to do this I am available 10000 numbers. Now, I want to know the percent of how much number I've already sell. The problem is that I cannot round the result

How do I to do this ?

Trying

    IList<NumbersLottery> allNumbers = context.AllNumbers.Where(n => n.concurso.id == concurso.id).ToList();
    int totalNumbers = allNumbers.Count; //10000
    int totalSellings = allNumbers.Where(n => n.status == NumbersLotteryStatus.SELL).ToList().Count;        
    int PercentSells =  (totalNumbers / 100) * totalSellings ;
    Debug.Writeline("Percents Sell: " + PercentSells); 
    //output example -> Percents Sell: 1200
        
FernandoPaiva
  • 4,410
  • 13
  • 59
  • 118

0 Answers0