Part One: Create a method which takes two int parameters and swaps them. Print the values before and after swapping. (Example: ‘before swap: x = 5, y = 10; after swap: x=10, y=5). Part2: Write a method which gets a value from the user and convert that value from Celsius to Fahrenheit: - For Celsius to Fahrenheit conversion use: F = 9*C/5 + 32 - Print the result of the conversion Part3: Create a method which takes an integer array input from the user and reverses the elements in the array. Print the reversed array. - For example, the expected “reversed” result for an array [5,33,0,8,2] is [2,8,0,33,5] - Don't use any inbuilt/existing array reverse method. Try to write the reversing logic
(language: Intellij-Java)
Part One: Create a method which takes two int parameters and swaps them. Print the values before and after swapping. (Example: ‘before swap: x = 5, y = 10; after swap: x=10, y=5).
Part2: Write a method which gets a value from the user and convert that value from Celsius to Fahrenheit:
- For Celsius to Fahrenheit conversion use: F = 9*C/5 + 32
- Print the result of the conversion
Part3: Create a method which takes an integer array input from the user and reverses the elements in the array. Print the reversed array.
- For example, the expected “reversed” result for an array [5,33,0,8,2] is [2,8,0,33,5]
- Don't use any inbuilt/existing array reverse method. Try to write the reversing logic
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images