Answer:
- public class Main {
- public static void main(String[] args) {
- String testString = "abscacd";
-
- String evenStr = "";
- String oddStr = "";
-
- for(int i=testString.length() - 1; i >= 0; i--){
-
- if(i % 2 == 0){
- evenStr += testString.charAt(i);
- }
- else{
- oddStr += testString.charAt(i);
- }
- }
-
- System.out.println(evenStr + oddStr);
- }
- }
Explanation:
Firstly, let declare a variable testString to hold an input string "abscacd" (Line 1).
Next create another two String variable, evenStr and oddStr and initialize them with empty string (Line 5-6). These two variables will be used to hold the string at even index and odd index, respectively.
Next, we create a for loop that traverse the characters of the input string from the back by setting initial position index i to testString.length() - 1 (Line 8). Within the for-loop, create if and else block to check if the current index, i is divisible by 2, (i % 2 == 0), use the current i to get the character of the testString and join it with evenStr. Otherwise, join it with oddStr (Line 10 -14).
At last, we print the concatenated evenStr and oddStr (Line 18).
Answer:
6.99 x 10⁻³ m³ / s
Explanation:
Th e pressure difference at the two ends of the delivery pipe due to atmospheric pressure and water column will cause flow of water.
h = difference in the height of water column at two ends of delivery pipe
6 - 1 = 5 m
Velocity of flow of water
v = √2gh
= √ (2 x 9.8 x 5)
= 9.9 m /s
Volume of water flowing per unit time
velocity x cross sectional area
= 9.9 x 3.14 x .015²
= 6.99 x 10⁻³ m³ / s
Answer:
What do you need help with?
Explanation:
Answer:
Those products are generally called Work in Process WIP
Explanation:
Work in process (WIP), or work in progress (WIP), goods in process, or in-process inventory in a manufacturing industry/company refer to the company's partially finished goods waiting for completion and eventual sale or the value of these items.
These items are either just being produced or require further processing (like purification, separation, packaging or handling) in a queue or a buffer storage.
Answer:
A battery changes chemical energy to <u>electrical</u> energy
A drum changes mechanical energy to <u>sound</u> energy
Explanation:
A battery is a device that stores chemical energy and converts it to electrical energy.
Beating a drum represents a mechanical to sound energy conversion.