Question

1. Pseudocode that shows the following: In single operation steps, add the numbers 12, 17, 11,...

1. Pseudocode that shows the following: In single operation steps, add the numbers 12, 17, 11, and 24, then subtract the numbers 13 and 7. Print the final result.
2. Pseudocode that shows the following: Read a temperature value. If the temperature exceeds 100 degrees, set HOT = TRUE. Otherwise, set HOT = FALSE.
3. Pseudocode that shows the following: Set an index to 0. Within a loop, set all 10 elements of an array named POINTS to the value 99.
4. Pseudocode that shows the following: Set an index to 0. Set a counter to 0. Within a loop, read each of the 20 elements in an array called LIST and increment the counter each time a match for the value 47 is located.
5. Pseudocode that shows the following: Set an index to 0. Within a loop, determine if one of 20 elements in an array called PARTS is equal to the value 73. If a match is found, exit the loop immediately and set FOUND = TRUE. If a match is not found in all 20 points, exit the loop and set FOUND = FALSE

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.P-code:

START
DECLARE result
result = 12 + 17 + 11 + 24 - 13 - 7
OUTPUT result
END
FLOWCHART:

Main Integer result result 12 17 11 24-13 7 Output result End

2.

P-code:

START
DECLARE temperature, HOT
INPUT temperature   
if temperature > 100
HOT = TRUE
else
HOT = FALSE  
END

3.

P-code:

START
DECLARE index, POINTS[10]
index = 0
while index < 10
POINTS[index] = 99
index = index + 1

END

4.P-code:

START
DECLARE index, counter, LIST[20]
index = counter = 0
while index < 20
if POINTS[index] == 47
counter = counter + 1
index = index + 1
END
5.

P-code:

START
DECLARE index, FOUND, PARTS[20]
index = 0
while index < 20
if PARTS[index] == 73
break;
index = index + 1
if PARTS[index] = 73
FOUND = TRUE
else
FOUND = FALSE
END

Add a comment
Know the answer?
Add Answer to:
1. Pseudocode that shows the following: In single operation steps, add the numbers 12, 17, 11,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Step 1. Start Netbeans and create a project called ArrayLab Step 2. Write the main method...

    Step 1. Start Netbeans and create a project called ArrayLab Step 2. Write the main method  Declare and initialize an array called myNums int myNums = {3, 8, 12, 4, 2, 9, 6};  Declare an int called largestNum and set it to 0.  Write a for loop that prints the array for (int index = 0; index < myNums.length; index++) { System.out.println(myNums[index] + “ “); }  Write a for loop that prints the array backwards ...

  • The Fibonacci sequence is the sequence of numbers: 0, 1, 1, 2, 3, 5, 8, 13,...

    The Fibonacci sequence is the sequence of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … The next number is found by adding up the two numbers before it. For example, the 2 is found by adding the two numbers before it (1+1). The 3 is found by adding the two numbers before it (1+2). The 5 is found by adding the two numbers before it (2+3), and so on! Each number in the sequence is called...

  • These questions come from the operating system course, please read the questions carefully, please do not give irrelevant answers, thank you. Part III Answer the following questions (20 points ea...

    These questions come from the operating system course, please read the questions carefully, please do not give irrelevant answers, thank you. Part III Answer the following questions (20 points each) 13. Suppose a file system maintains a free list with a bit map that is implemented as an array of 16 bit unsigned integers. Assume that other code has been written to allocate and initialize this array with enough words allocated to handle N blocks. Write pseudocode to set or...

  • Modify PartTwo.cpp so that it is uses a vector, named vect, instead of an array. PartTwo.cpp...

    Modify PartTwo.cpp so that it is uses a vector, named vect, instead of an array. PartTwo.cpp Is posted here: // This program reads data from a file into an array. Then, it // asks the user for a number. It then compares the user number to // each element in the array, displays the array element if it is larger. // After looking at entire array, it displays the number of elements in the array larger // than the user...

  • Lab 7 Add three instance variables to your class RightTriangle from lab 5. The first two...

    Lab 7 Add three instance variables to your class RightTriangle from lab 5. The first two are of type int and are called xLoc and yLoc and the third is of type int called ID. Also add a static variable of type double called scaleFactor. This should be initialized to a default value of 1. Update the constructor to set the three new instance variables and add appropriate get and set methods for the four new variables. All set methods...

  • Question from Object-Oriented Data Structures Using Java 4th Edition Chapter 5 Question 30 Add the following...

    Question from Object-Oriented Data Structures Using Java 4th Edition Chapter 5 Question 30 Add the following methods to the LinkedCollection class, and create a test driver for each to show that they work correctly. Code each of these methods by accessing the internal variables of the LinkedCollection, not by calling the previously defined methods of the class.String toString() creates and returns a string that correctly represents the current collection. 1. Such a method could prove useful for testing and debugging...

  • QUESTION 1 Using the following declarations and a member of the Array class, int [ ]...

    QUESTION 1 Using the following declarations and a member of the Array class, int [ ] bArray = new int [10]; int location; Using a method in the Array class, write a statement that would change the order of the elements in the bArray array. The contents of the first cell should hold what was in the last cell. The second cell should hold what was in the next to last cell. __________________________ HINT: You must write the full statement...

  • Write in C++: Please create a shopping list using the STL list container, then follow the...

    Write in C++: Please create a shopping list using the STL list container, then follow the following instructions. Create an empty list. Append the items, "eggs," "milk," "sugar," "chocolate," and "flour" to the list. Print the list. Remove the first element from the list. Print the list. Insert the item, "coffee" at the beginning of the list. Print the list. Find the item, "sugar" and replace it with "honey." Print the list. Insert the item, "baking powder" before "milk" in...

  • Lottery Game (15 Numbers). Design and implement a C++ program that generates 15 random non-repeating positive...

    Lottery Game (15 Numbers). Design and implement a C++ program that generates 15 random non-repeating positive integer numbers from 1 to 999 (lottery numbers) and takes a single input from the user and checks the input against the 15 lottery numbers. The user wins if her/his input matches one of the lottery numbers. Your implementation must have a level of modularity (using functions) Functions you need to implement: Define function initialize() that takes array lotterNumbers[] as a parameter and assigns...

  • Fill the blank in each of the following using the terms at the bottom. IT. When...

    Fill the blank in each of the following using the terms at the bottom. IT. When an array is created, a value in the array is called a(n) 12. f and ) must always be used with an if) statement: True or False 13. Theoperator is used to check if two values are equal. 14. A command can only be used in a loop statement. 15. Acommand can be used in both a loop and switch statement. 16. In the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT