![JamesDelia](/avatars/45277.jpg)
JamesDelia
15.07.2021 •
Computers and Technology
Write a program whose input is two integers and whose output is the two integers swapped. Place the values in an array, where x is position 0 and y is position 1.Ex: If the input is: 3 8 then the output is: 83 Your program must define and call a method: public static void swapValues (int[] "values) LabProgram.java 1 import java.util.Scanner; 23 public class LabProgram 4 5 /* Define your method here 6 7 public static void main(String[args) { 8 /* Type your code here. / 9 } 10 } 11
Solved
Show answers
More tips
- H Health and Medicine What You Need to Know About Nasal Congestion in Infants: Causes, Symptoms, and Treatment...
- A Auto and Moto Mastering One-Movement Parking: All You Need to Know...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- C Computers and Internet How to Choose an Uninterruptible Power Supply (UPS) for Your Computer: Expert Tips...
- S Science and Technology How to choose a home theater system?...
- A Auto and Moto How to Choose a Car Wash? Tips and Recommendations...
- A Animals and plants How ants survive winter: exploring the secrets of their winter life...
- C Construction and repair How to Choose the Best Underfloor Heating?...
- S Sport When is the Champions League final?...
Answers on questions: Computers and Technology
- C Computers and Technology Ann wants to download Adobe Acrobat software from the Internet. Prior to downloading, a standardized online contract appears on the screen that requires her to click on an icon...
- C Computers and Technology Type the correct answer in the Box spell the words correctly Caleb is working on a simple logic base program to stimulate the game of tic-tac-toe which program language would he...
- C Computers and Technology Mi amiga es una chica y es soltera y quiere novia, a cualquiera le interesa?...
- C Computers and Technology A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and 5. The number 6, however,...
- M Mathematics PLZ HELP PLZZZZZZZZZ DONT GET IT WRONG...
- B Biology What does the atomic mass of a element represent ?? A. The total mass of its neutrons B. The average total mass of its electrons C. The total number of its protons and electrons...
- E Engineering A company produces two products, A and B. The sales volume for A is at least 80% of the total sales of both A and B. However, the company cannot sell more than 110 units of A per...
- M Mathematics 2 1/3 −1 1/4= can u help me find the answer...
- G Geography What is the rock that floats high on the mantle that makes up the continents?...
- M Mathematics Insert commas according to international system for 47582162315...
Ответ:
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{ public static void swapValues(int[] values)
{int temp= values[0];
values[0]=values[1];
values[1]=temp;
System.out.print(values[0]+" "+values[1]);}
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc= new Scanner(System.in);
int A[] = new int[2];
A[0] = sc.nextInt();
A[1]= sc.nextInt();
swapValues(A);
}
}
Input:-
3 8
Output:-
8 3
Input:-
1 2
Output:-
2 1
Ответ:
please mark my answer brainliest
Explanation:
according to the formula...
density =mass/ volume...
density =21.0/2.00=10.5 g/ cm^3