Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp18
- {
- class Program
- {
- static void Main(string[] args)
- {
- Game game = new Game("Shooter", "multiplayer", 50);
- Game game1 = new Game("Strategy", "multiplayer", 40);
- MaxPrice(game, game1);
- }
- static void MaxPrice(Game game1 ,Game game)
- {
- Console.WriteLine(Math.Max(game.price, game1.price));
- }
- }
- }
- class Game
- {
- public string kind;
- public string multiplayer;
- public double price;
- public Game(string kind, string multiplayer,double price)
- {
- this.kind = kind;
- this.multiplayer = multiplayer;
- this.price = price;
- }
- }
Add Comment
Please, Sign In to add comment