in java  eclipse ide    Write a program: Input from console 2 integer numbers, save them in variables vx and vy. Compare vx to vy: if vx is greater than vy, then swap values in vx and vy so vx will always hold the smaller value. Display message: “vx={value}; vy={value}” ({value} will be replaced with numbers stored in vx and vy)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

 in java  eclipse ide 

 

  1. Write a program:
  • Input from console 2 integer numbers, save them in variables vx and vy.
  • Compare vx to vy: if vx is greater than vy, then swap values in vx and vy so vx will always hold the smaller value.
  • Display message: “vx={value}; vy={value}”

({value} will be replaced with numbers stored in vx and vy)

Expert Solution
Step 1

I give the code in java eclipse and also provide the output and code screenshot

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
InputStream
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT