Created
July 2, 2009 09:52
-
-
Save jschementi/139405 to your computer and use it in GitHub Desktop.
This file contains hidden or 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; | |
using System.Collections.Generic; | |
namespace Demo { | |
public class Calculator { | |
private List<int>args = new List<int>(); | |
public void Push(int n) { | |
args.Add(n); | |
} | |
public int Add() { | |
int result = 0; | |
foreach(int n in args) { | |
result += n; | |
} | |
return result; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment