Ask a New Question

Asked by stephanie

Create the logic for a program that prompts a user for three
numbers and stores them in an array. Pass the array to a
method that reverses the order of the numbers. Display the
reversed numbers in the main program.
12 years ago

Answers

Answered by Steve
for i=1 to 3
prompt "Enter a number"
read a(i)

b = reverse(a)
print b

function reverse(x)
for i=1 to 3
y(4-i) = x(i)
return y
end function
12 years ago

Related Questions

creat a logic for a program that continuously prompts the user for a numeric number of dollars unti... Create the logic for a program that continuously prompts the user for a number of dollars until the... Create the logic for a program whose main() method prompts a user for 1000 numbers and stores them i... create the logic for a program that calculates and displays the amount of money you would have if yo... Create the logic for a program that continuously prompts a user for a numeric value until the user... Design program logic that receives the letter grades for 4 subjects and then based on the grades, ca... Create the logic for a program that calls a method that computes the final price for a sales transac... Design the logic for a program that allows a user to enter 10 numbers, then displays each and its di... Design the logic for a program that allows a user to enter any amount of numbers up to 10 or until a... Create the logic for a program that accepts input values for the projected cost of a vacation and th...
Ask a New Question
Archives Contact Us Privacy Policy Terms of Use