Your code should print the numbers 5,8,4 and 2 to the screen, each in its own separate
Fantastic news! We've Found the answer you've been seeking!
Question:
Your code should print the numbers 5,8,4 and 2 to the screen, each in its own separate output line. Then, the code should add all of the numbers and display their sum to the screen, on yet another output line.
The output of your code should look like this:
5
8
4
2
19
Please do this in 3 ways:
Without using variables at all.
Using 4 independent variables (one for each number) and another variable for the sum.
Reusing the same variable for the numbers and an additional variable for the sum.
How can i write this
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: