Find the Error
33. The following pseudocode
area = width × length.
Display "What is the room’s width?".
Input width.
Display "What is the room’s length?".
Input length.
Display area.
Trending nowThis is a popular solution!
Chapter 1 Solutions
Starting Out With C++, Early Objects (Looseleaf)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Objects (6th Edition)
Starting Out with Python (4th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Digital Fundamentals (11th Edition)
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Computer Science: An Overview (12th Edition)
- (Computation) A magic square is a square of numbers with N rows and N columns, in which each integer value from 1 to (N * N) appears exactly once, and the sum of each column, each row, and each diagonal is the same value. For example, Figure 7.21 shows a magic square in which N=3, and the sum of the rows, columns, and diagonals is 15. Write a program that constructs and displays a magic square for a given odd number N. This is the algorithm:arrow_forwardThe following pseudocode algorithm has an error. The program is supposed to askthe user for the length and width of a rectangular room, and then display the room’sarea. The program must multiply the width by the length in order to determine thearea. Find the error.area width length.Display “What is the room’s width?”.Input width.Display “What is the room’s length?”.Input length.Display area.arrow_forward“Pseudocode is a step by step written outline of your code that you can gradually transcribe into the programming. Pseudocode is useful to describe how an algorithm should work. It also explains a computing process to less-technical users.”Write a pseudocode to check whether a character is a Vowel or Consonant.arrow_forward
- design a program for a professor to calculate the average of the three test scores for the students and congratulate the student enthusiastically if the average is greater than 95. here is the algorithm below. write the pseudocode for this program: 1. get the first test score. 2. get the second test score. 3. get the third test score. 4. calculate the average. 5. display the average. 6. if the average is greater than 95, congratulate the student.arrow_forwardThe following pseudocode algorithm contains two errors. It issupposed to use assigned values to calculate and display theaverage of two numbers. Find both errors.num1 = 6num2 = 7average = (num1 + num1)/2display avgarrow_forwardAssembly Programming Language Question: Three Zero GameWrite a program that reads a number. Then by subtracting off a three and tens, determine if that value ends in a zero or a three. Three such numbers in a row wins the game! Shown below are sample program dialogues to help you build your program: Gimme a number: 20It ends in zero!Keep going...Gimme a number: 53It ends in three!Keep going...Gimme a number: 41Sorry Charlie! You lose the game!arrow_forward
- Computer Fundamentals and Programming 2 Input a number and identify if it is "Positive", "Negative" or "Zero". Using Java Codesarrow_forward"Computer Science" refers to the study of computers. What does it mean to program visually?arrow_forwardFind the error in the pseudocode example listed below: Declare real lowest, highest, average (this is not the error) Display "Enter the lowest score" Input lowest Display "Enter the highest score" Input highest Set average = lowest + highest / 2 Display "The average is ", average, "."arrow_forward
- Design an algorithm for a program that calculates the current balance in a savings account. The program should obtain from the user the following information: The starting balance The total amount of deposits made The total amount of withdrawals made Monthly interest rate The program will then use this information to calculate the current balance and display it on the screen. Perform a dry run for the design in a).arrow_forwardComputer graphics The original coordinates of the point in polar coordinates are ______ and ______.arrow_forwardAreas of Rectangles - MUST BE WRITTEN PSEUDOCODE 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 whether the areas are the same.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr