Thursday, 7 March 2013

week 5 day 3

Today, I learned more about functions, I learned about how they can be used to add or subtract and multiply or divide numbers you enter into it. using a lone of code like this:
int addFunction (int a, int b)
{
      x = a+b;
      return (a + b)
}
this would add the numbers together and then assign them to the letter X, to be called by any function. This is the basics of using math to call something from another function just to add them together.

No comments:

Post a Comment