// Encapsulation
/* We are developing a profile system for player of our online game. The program already takes the number of games and wins as input and creates a player object.
Complete the GetWinRate() method inside the given Player class to calculate and output the win rate. */
/* Explanation: Win rate is calculated by this formula: wins*100/games. So, in this case win rate is 70*100/130 = 53 (the final result should be an integer). */
using System;
public class Program
{
public static void Main()
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()
Console.Write(winrate = (wins * 100) / games);