Skip to content

Instantly share code, notes, and snippets.

@smzn
Created May 19, 2017 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smzn/d407b2d0d7b6e8f9af25fc5a0e054d7d to your computer and use it in GitHub Desktop.
Save smzn/d407b2d0d7b6e8f9af25fc5a0e054d7d to your computer and use it in GitHub Desktop.
20170519_2
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