Question

In pseudocode, Given a dollar amount x, write an if-statement that prints “x is higher” if...

In pseudocode,

Given a dollar amount x, write an if-statement that prints “x is higher” if x is higher than another dollar amount y

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

BEGIN

DECLARE INTEGER x

DECLARE INTEGER y

Display "Enter x"

Input x

Display "Enter y"

Input y

IF (x>y) THEN

write "x is higher"

ENDIF

In the pseudocode IF , x is compared with y. If x is greater than y then write x is higher

Add a comment
Know the answer?
Add Answer to:
In pseudocode, Given a dollar amount x, write an if-statement that prints “x is higher” if...
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
  • Write a pseudocode description of the printLCS () algorithm, which prints the longest common subs...

    Write a pseudocode description of the printLCS () algorithm, which prints the longest common subsequence of two strings x and y. Your algorithm should take as input the completed ïïcs Π integer array of longest common subsequence lengths, and the two strings x and y. (So, you do not have the path[] [] array - see Lecture 19, slides 100 and 101.) Your algorithm must return the specific string corresponding the length found in 1lcs [n] [m] and it should...

  • 1) Translate the following equation into a Python assignment statement 2) Write Python code that prints...

    1) Translate the following equation into a Python assignment statement 2) Write Python code that prints PLUS, MINUS, O ZERO, depending on the value stored in a variable named N. 3) What is printed by: 3 - 1 while 5: while 10 Print ) Page 1 of 9 4) Write a Python while loop that reads in integers until the user enters a negative number, then prints the sum of the numbers. 1-2 of 9 4) Write a Python while...

  • Re-write the following if statement structure as a SWITCH/CASE statement in C++ and Pseudocode:       X...

    Re-write the following if statement structure as a SWITCH/CASE statement in C++ and Pseudocode:       X ← 1       A ← 3       IF (a is equal to 1) THEN          x ← x + 5       ELSE IF (a is equal to 2) THEN          x ← x + 10       ELSE IF (a is equal to 3) THEN          x ← x + 15       ELSE IF (a is equal to 4) THEN          x ← x +...

  • Please answer it by easy JAVA pseudocode. Thanks Write a pseudocode algorithm that calculates and prints...

    Please answer it by easy JAVA pseudocode. Thanks Write a pseudocode algorithm that calculates and prints the overall MPG (miles per gallon) for a series of miles and gallons user inputs. Use a loop to repeatedly ask the user to enter a miles value and a gallons value. Within the loop, accumulate miles and gallons separately. Use a counter loop to ensure that the loop repeats three times. The algorithm should generate a display of prompts, inputs, and final output...

  • Write an if-else statement that prints "Goodbye" if userString is "Quit", else prints "Hello". End with...

    Write an if-else statement that prints "Goodbye" if userString is "Quit", else prints "Hello". End with newline. IN C

  • Write a Python Program What should the values of X and Y be, so that the...

    Write a Python Program What should the values of X and Y be, so that the following code prints the 'd' found inside one of the elements of alist? alist = [['47a','47b'],'47c','47d',[['47e','47f'],'47g']] print(alist[X][Y]) Then write another print(...) statement that prints the the 'b' inside of alist, by indexing again into to its specific location within alist.

  • Write pseudocode for an algorithm that is given the length and width, in feet, of a...

    Write pseudocode for an algorithm that is given the length and width, in feet, of a rectangular carpet and determines its total cost given that the material cost is $23/square yard.

  • Convert the following pseudocode into C++ language. Declare X, Y, Z As Integer For (X =...

    Convert the following pseudocode into C++ language. Declare X, Y, Z As Integer For (X = 1; X < 4; X++) Write “Pass Number “ + X For (Y = 1; Y < 10; Y+3) Set Z = X + Y Write X + “ + “ + Y + “ = “+ Z End For(Y) End For(X)

  • Write pseudocode to solve the following problem: You are given an array A[1...n] whose each element...

    Write pseudocode to solve the following problem: You are given an array A[1...n] whose each element is a point of the plane (x,y). You need to sort the array so that points with lower x-coordinates come earlier, but among points with the same x-coordinate, the ones with larger y-coordinate come earlier. So, for example, if the array contains: (1,2), (1,4), (7,10), (11,3), (14,1), (7,2) The output, in this case, should be: (1,4), (1,2), (7,10), (7,2), (11,3), (14,1) Analyze the running...

  • A. Write an algorithm in pseudocode, which prints all strings of length 6 where the first...

    A. Write an algorithm in pseudocode, which prints all strings of length 6 where the first three characters are any symbol from X={!,@,#,$,%,^}, the 4th and 5th characters are any digit 0,1,…9, and the last character is any digit 1,2,…9. How many times will the print command be called (e.g. how many 6-character strings will be printed)? B. Let g(n)=n3 + 2n2 - 5. Determine the big-theta estimate of f. A complete response will include analysis of: , and ....

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