İos development making a button to do something on other viewcontroller
===

Yep as the title says I need to make a button to do something on another page.I know how to code a button to make wanted things on the same page(same viewcontroller) also make that button to open another page(another viewcontroller) but how can I make it both at the same time ?

Here is an example for a simple calculator.

Open the program
Enter two numbers
Click the button
SecondPage comes up and shows the result from the first page

Is it something about delagates please explain it to me thanks...