You need to pass a string to the Print statement. You concatinate (build up) strings with the + operator, so:
Print "a + b = " + a + b
would print
a + b = 510 - because it's concatinating the value of a to the string, then concatinating the value of b to the string.
To add the numbers together before concatinating the result to the string just put the calculation in brackets:
Print "a + b = " + (a + b)
Brackets basically mean, do this first, so this would add the number together and then concatinate the result to the string, printing:
a + b = 15
Does any of that make sense?
Print "a + b = " + a + b
would print
a + b = 510 - because it's concatinating the value of a to the string, then concatinating the value of b to the string.
To add the numbers together before concatinating the result to the string just put the calculation in brackets:
Print "a + b = " + (a + b)
Brackets basically mean, do this first, so this would add the number together and then concatinate the result to the string, printing:
a + b = 15
Does any of that make sense?