<h2>Please wait until more research is discovered...</h2>
Question
A size of a jumbo candy bar with rectangular shape is l x w x h. Due to rising costs of cocoa, the volume of the candy bar is to be reduced by p%.
To accomplish this, the management decided to keep the height of the candy bar the same, and reduce the length and width by the same amount.
For example, if l = 12, w = 7, h = 3, and p = 10, then the new dimension of the candy bar is 11.39 x 6.64 x 3.
Below is an example of how the completed program should work:
Enter the length, width, and height of the candy bar separated by space(s): 12 7 3
Enter the amount of the reduced volume as a percentage: 10
The new dimensions of the candy bar is: 11.38 x 6.64 x 3.00
Format your output with setprecision(2) to ensure the proper number of decimals for testing!
Answer: A is the correct choice.
<u>Answer:</u>
<em>using System;
</em>
<em>public class Program
</em>
<em>{
</em>
<em> public static void Main()
</em>
<em> {
</em>
<em> String input ;
</em>
<em> while(true)
</em>
<em> {
</em>
<em> input = Console.ReadLine();
</em>
<em> if(input.Equals(""quit""))
</em>
<em> break;
</em>
<em> Reverse_String(input);
</em>
<em> }
</em>
<em> return;
</em>
<em> }
</em>
<em>static void Reverse_String(string input_text)
</em>
<em>{
</em>
<em> char[] text = input_text.ToCharArray();
</em>
<em> Array.Reverse(text);
</em>
<em> Console.WriteLine(text);
</em>
<em>}
</em>
<u>Explanation:</u>
<em>In the above program a separate function is written to reverse the string.</em>
This method takes the string as an argument and place it in a array and then use the built-in function reverse and print the reversed string in the console.
<em>In the main(), the input is obtained from the console and it is passed to the reversestring().
</em>