<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>
def power_of_2(p):
if p == 2:
return True
elif p < 2:
return False
return power_of_2(p/2)
print(power_of_2(32))
The function keeps dividing the number by 2 until it is equal to 2 or the number ends up being less than 2. If at some point the number is equal to 2, it is a power of 2 otherwise it's not a power of 2.
D I believe. I’m not %100 percent sure.
Answer:
The summary of that same question would be described throughout the following section.
Explanation:
- Specification of simple or rough arithmetic has been accomplished through imaginative technologies with stone blocks, developers have always used computer systems again for the past decades.
- The varying forms of technology of the 5th generation were indeed desktops, notebooks, or laptops, and they can look at images of pieces of machinery that have been pioneered before today's computer systems.