Skip to content

Commit 7cca8d9

Browse files
authored
Update README.md
1 parent 9a0b75d commit 7cca8d9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
# Math Magic
22
Instructions: In this project, you will become a mathemagician and write a small program that performs a mathematical magic trick! It will involve performing arithmetic operations on an integer that you choose. The instructions provided are general guidelines. Upon completion of the project, feel free to explore the code on your own.
33

4+
```java
5+
public class Magic {
6+
public static void main (String[], arg) {
7+
int myNumber = 15;
8+
9+
// We will refer to myNumber as the original number from now on.
10+
11+
int stepOne = (myNumber) * (myNumber);
12+
int stepTwo = (stepTwo) + myNumber;
13+
int stepThree = (stepTwo) / myNumber;
14+
int stepFour = (stepThree) + 17;
15+
int stepFive = (stepFour) - myNumber;
16+
int stepSix = (stepFive) / 6;
17+
18+
System.out.println(stepFive);
19+
}
20+
}
21+
// FZ
22+
23+
Sample out: 18
24+
```
25+
426
## Thanks for watching!
527

628
If you liked my coding then follow me on my [Instagram](https://www.instagram.com/fabianzelayahn/) account or [GitHub](https://github.com/fabianzelaya) account.

0 commit comments

Comments
 (0)