Created
May 19, 2017 05:55
-
-
Save smzn/d407b2d0d7b6e8f9af25fc5a0e054d7d to your computer and use it in GitHub Desktop.
20170519_2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace _2 | |
{ | |
class MainClass | |
{ | |
public static void Main (string[] args) | |
{ | |
Console.Write ("n -> "); | |
int n = int.Parse (Console.ReadLine ()); | |
Console.Write ("m -> "); | |
int m = int.Parse (Console.ReadLine ()); | |
Library library = new Library (n, m); | |
int result = library.getPlus(); | |
Console.WriteLine ("Answer:" + result); | |
} | |
} | |
class Library{ | |
private int n,m; | |
public Library(int n, int m){ | |
this.n = n; | |
this.m = m; | |
} | |
public int getPlus(){ | |
return this.n + this.m; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment