- Open this file in your browser and Microsoft Visual Studio.
- Add your name, section, and email.
- Add code after the line:
YOUR CODE STARTS AFTER THIS LINE: to complete this lab.
- Your output should look like the Example Output below.
- Variable declarations section
- Write a comment that identifies this coding section.
- Add the following variables:
myNumber
mySalary
year
loopCounter
- Assignments section
- Write a comment that identifies this coding section.
- Assign the following data to the variables created in the previous section.
- myNumber -->
200
- mySalary -->
40000.00
- year -->
2008
- loopCounter -->
zero
- Processing section
- Write a comment that identifies this coding section.
- Using ONLY compound assignment operators for the math, perform the following operations:
- Display the
myNumber variable on the page.
- Add
25 to myNumber
- subtract
75 from myNumber
- Display the
myNumber variable on the page.
- Give yourself a
10% raise (multiply your salary by 1.1)
- Display the
mySalary variable on the page.
2008 is a leap year, what's the next one?
- Display the
year variable on the page.
- Add
five to the loopCounter
- Display the
loopCounter variable on the page.
Example Output
myNumber: 200
myNumber: 150
mySalary: 44000.0
year: 2012
loopCounter: 5
Your Output: