Pt1420 Unit 5 Assignment 1

987 words 4 pages
Short Answer
1. Explain what is meant by the term “conditionally executed”. Conditionally executed is called a single alternative decision structure because it provides only one alternative path of execution. The action is conditionally executed because it is performed only when a certain condition is true.

2. You need to test a condition and then execute one set of statements if the condition is true. If the condition is false, you need to execute a different set of statements. What structure will you use?
I will use the “If” statement because it is a dual alternative decision structure.

3. If you need to a test the value of a variable and use that value to determine which statement or set of statements to execute, which
…show more content…
Roman Numerals
Design a program that prompts the user to enter a number within the range of 1 through 10. The program should display the Roman numeral version of that number. If the number is outside the range of 1 through 10, the program should display an error message.
Main Mod Declare Integer

2. Areas of Rectangles
The area of a rectangle is the rectangle’s length times its width. Design a program that asks for the length and width of two rectangles. The program should tell the user which rectangle has the greater area, or if the areas are the same.

Main Module Declare length1 as integer, length2 as Integer, width1 as integer,width2 as integer Declare AreaOfFirstRectangle as integer, AreaOfSecondRectangle as integer

Display "Enter length of first rectangle" Input length1 Display "Enter width of first rectangle" Input width1

AreaOfFirstRectangle =length1 * width1

Related

  • nvq level 5 leadership and management in health and social care unit 1
    1035 words | 5 pages
  • Chapter 1-6 assignment
    3953 words | 16 pages
  • Sc300-Unit 6 Assignment
    1143 words | 5 pages
  • Pol 300 Week 5 Assignment 1 New Strayer
    1062 words | 5 pages
  • Assignment 1
    1553 words | 7 pages
  • Midterm Unit 5 Criminology
    1419 words | 6 pages
  • Unit 1
    2422 words | 10 pages
  • Gb540 Unit 1 Assignment
    1464 words | 6 pages
  • Com 105 Unit 5 Assignment 1 Lasa 2 Putting the Puzzle Together Com105 Unit 5 Assignment 1 Lasa 2 Putting the Puzzle Together
    2231 words | 9 pages
  • Unit 532 Diploma 5
    3669 words | 15 pages