- Open this file in your browser and Microsoft Visual Studio
- Add your name, section, and email
- Add code after the line:
// PART 1: YOUR CODE STARTS AFTER THIS LINE: to complete the exercise.
- Variable declarations section
- Write a comment that starts the variable declaration section. Something like "
// Variable declarations" would work!
- Create a variable named
enteredNumber that will hold a number.
- Processing section
- Write a comment that starts this section.
- Prompt the user to enter a number and assign the entered value to the
enteredNumber variable.
- Convert the entered value to a number and assign the number to the
enteredNumber variable.
- Display the contents of the
enteredNumber variable on the page with accompanying text.
- Prompt the user for a number again. Assign the new entered value to the
enteredNumber variable.
- Convert the entered value to a number and, once again, assign it to the
enteredNumber variable.
- Finally, display the
enteredNumber variable on the page with some different accompanying text.
Sample Part 1 Output:
You entered the number: 1234
Then you entered the number: 4321
Your Part 1 Output: