Program a day 4
From CompSciWiki
COMP 1010 Home > Program_a_day
IntroductionAn exercise to evaluate a skill-testing question.
|
---|
{{{Body}}}
What do you need to know?
- How to evaluate an expression.
- How to print the result of evaluating an expression.
- Where you can insert brackets into an expression.
Inputs
No inputs are required.
Outputs
- One line for each different result using brackets. E.g.,
6 x 8 - (5 + 9) = 34
- One line evaluating the expression without brackets.
Transformation
- Insert brackets into the expression in many different ways.
- Print out only one line with each different possible result.
Solution
Look here.
Template loop detected: Template loop detected: