Find the error in the following pseudocode.
Declare Integer value1, value2, value3, sum
Set sum = value1 + value2 + value3
Display “Enter the first value.”
Input value1
Display “Enter t he second value."
Input value2
Display “Enter t he third value.”
Input value3
Display “The sum of numbers is”, sum
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Starting Out with Programming Logic and Design (4th Edition)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Starting Out with C++: Early Objects (9th Edition)
Artificial Intelligence: A Modern Approach
- Find the error in the following pseudocode. Declare Real pi Set 3.14159265 = pi Display "The value of pi is ", piarrow_forwardUsing pseudo code Write a design to calculate and display the sum, subtraction, division or multiplication of 2 prompted numbers Prompt the user for a type of calculation ( + - * / )Prompt the user for 2 numbersCalculate and display the answerarrow_forwardDirection : Make a guessing game program that will generate a random number and ask the user to guess the generated value with at most three (3) attempts: Problem/Required : The system should have the corresponding feature/s: Generate a random value between 1 to 10. Give the user at most 3 attempts to input a value between 1 to 10. Display “Higher” or “Lower” depending on the user’s input compared to the generated value. Display “Sorry, 3 attempts already.” after 3 incorrect attempts, “Congratulations! You got it in n attempt/s” Show the generated number.arrow_forward
- Capitalize initial keyword – This is a rule while writing a pseudo code. T/Farrow_forwardAutoSave AB2 PROORAMING EXERCISES Draw Design Insert Share Commants Arial Career Life Instructions A piece of wire is to be bent in the form of a circle to put around a picture frame. Write a program that prompts the user to input: 1. The length of the wire The program then outputs: 1. the radius and area of the circle. You may assume that TT = 3.1416. Declare PI as a named constant with this value. ge 5 of 9 1466 words Focus 123% 动 + --arrow_forwardPEN AND PAPER FLOWCHART. Hand write the correct pseudocode using pen and paper. // This pseudocode is intended to determine whether students have// passed or failed a course; student needs to average 60 or// more on two tests.start Declarations num firstTest num secondTest num average num PASSING = 60 while firstTest not equal to 0 output "Enter first score or 0 to quit " input firstTest output "Enter second score" input secondTest average = (firstTest + secondTest) / 2 ouput "Average is ", average if average >= PASSING then output "Pass" else output "Fail" endif endwhilestoparrow_forward
- :Constant value must be Number O Character .Number or Constant .One of abovearrow_forwardID: A 9. Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case. Consider the following program. ode segmer own down count 1 ch of the fo sum 0 REPEAT DISP REPEAT 10 TIMES REPEA DI sum Sum + count PEAT 3 TIM count count + 2 REPEAT 2 DISPLA DISPLAY sum SPLAY "dow The program displays the sum of the even integers from 0 to 10. Which of the following describes the result of executing the program? The program displays the sum of the odd c. integers from 1 to 9. a. The program displays the sum of the even integers from 0 to 20. d. The program displays the sum of the odd integers from 1 to 19. b. dearrow_forwardQ2: - Design In Visual Basic a form and write a code to find the largest value of N numbers using Do While Loop. Use InputBox function to read numbers.arrow_forward
- Odd Even Number Problem Description Even Numbers are integers that are exactly divisible by 2, whereas an odd number cannot be exactly divided by 2. Example of even numbers are 2,4,6,8 and odd numbers are 1, 3, 5, 7, 9. Input The first line input contains an integer, which determines the number of test cases. Each of following lines represent sequence of integers that ends with 0. 2 34 1 8 5 22 0 10 7 16 -2 0 Output For each test case, the output will present the size of oddQueue and evenQueue following with the integers of odd and even numbers. oddQueue 2: 1 5 evenQueue 3: 34 8 22 oddQueue 1: 7 evenQueue 3: 10 16 -2 ** Your task is to write a program that will read the input and identify whether it is an odd number or even number. /******************************************************************************* Compilation: javac Queue.java** The Queue class represents a first-in-first-out (FIFO) queue of generic items.* It supports the usual enqueue and dequeue…arrow_forwardProgramming logic and designarrow_forwardInstructions Instructions Write a program that prompts the user to enter two integers. The program outputs how many numbers are multiples of 3 and how many numbers are multiples of 5 between the two integers (inclusive).arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,