Introduction To Programming
10-152-310

Learning Plan 3 : Math and Operators

Student

  • Name:
  • Section:
  • Email:

Part 1

  1. Open this file in your browser and Microsoft Visual Studio
  2. Add your name, section, and email
  3. Add code after the line: // PART 1: YOUR CODE STARTS AFTER THIS LINE: to complete the exercise.
    1. Variable declarations section
      1. Write a comment that starts the variable declaration section.
      2. Create two variables that will hold numbers.
      3. Create two variables that will hold the results of numeric calculations.
    2. Assignments section
      1. Write a comment that starts the assignments section.
      2. Prompt the user to enter two numbers and assign the entries to the variables.
      3. Convert the entered data to numbers.
    3. Calculation section
      1. Write a comment that starts the calculation section.
      2. Multiply the first number by the second number and store the results in a results variable.
      3. Divide the first number by the second number and store the results in a results variable.
    4. Output section
      1. Write a comment that starts the output section.
      2. Display the two entered numbers on the page.
      3. Display the two calculated number on the page.

Sample Part 1 Output:

        First Number: 25
        Second Number: 10
        Calculations:
        25 * 10 = 250
        25 / 10 = 2.5

Your Part 1 Output:


        

Part 2

Problem Statement

Write a program that asks a user to enter 5 numbers. The program will calculate the modulo of each number. The program will display the entered numbers and the modulo of each number.

The Program Planning Lists

  • In the following pre tag, write the three planning lists based on the verbs and nouns you see in the problem statement.
        The List of Input Variables:
        
        The List of Output Variables:
        
        The Process Checklist:
        

Sample Part 2 Output:

        Modulo:
        (34 % 2) is 0
        (12 % 2) is 0
        (15 % 2) is 1
        (24 % 2) is 0
        (77 % 2) is 1

Your Part 2 Output: