0

solve this c# exercise out

Hello friends, Anyone helping me to solve this Sololearn exercise? I'm new on programming.Thx in advance. We have developed a profile system for players where the program is already taking the number of games and wins as inputs and creates a player object. Complete the GetWinRate() method in the Player class to calculate and get the winrate. namespace SoloLearn { class Program { static void Main(string[] args) { int games = Convert.ToInt32(Console.ReadLine()); int wins = Convert.ToInt32(Console.ReadLine()); //creating the player object Player player1 = new Player(); player1.games = games; player1.wins = wins; //output player1.GetWinRate(); } } class Player { public int games; public int wins; //winrate is private private int winrate; //complete the method public void GetWinRate() { } } }

9th Mar 2021, 8:18 PM
ASENCIO ORTIZ SAEZ
2 ответов
+ 2
Yes ,Nazeekk THX!
9th Mar 2021, 9:42 PM
ASENCIO ORTIZ SAEZ
0
Is it the thing that you want to get? https://code.sololearn.com/csUYHPerX7Ze/?ref=app
9th Mar 2021, 9:26 PM
Nazeekk
Nazeekk - avatar