Answer:
Following are the program in the Java Programming Language.
//define function
public static boolean checkPalindrome(String str){
//set integer variable to 0
int a = 0;
//set integer variable to store the length of the string
int n = str.length() - 1;
//set the while loop to check the variable a is less than the variable n
while(a<n)
{
//check the string character is not in the variable n
if(str.charAt(a)!= str.charAt(n))
//then, return false
return false;
//the variable a is incremented by 1
a++;
//the variable n is decremented by 1
n--;
}
//and return true
return true;
}
Explanation:
<u>Following are the description of the following function</u>.
- Firstly, we define boolean type public function that is 'checkPalindrome' and pass string data type argument 'str' in its parameter.
- Set two integer data type variables that are 'a' initialize to 0 and 'n' which store the length of the string variable 'str' decremented by 1.
- Set the While loop that checks the variable 'a' is less than the variable 'n', then we set the If conditional statement to check that the string character is not in the variable n then, return false.
- Otherwise, it returns true.
Of course it was rewritten in the popular C++ Programming Language.
a. True
Answer:
Data Type: Double (decimal)
Variable Name: avg
Explanation:
An average of numbers will typically give you a decimal answer. Therefore, you should use the Double data type.
The answer to your question is: <span>Explain- </span>
<span>The CPU, monitor, speaker or earphone, keyboard, mouse etc. that you can touch are hardware. </span>
<span>The software or program such as the operating system, windows media player, ms office, paint etc that you cannot touch actually but they are shown on the monitor are called software. </span>
<span># You play the music with Windows media player or any music player that means you are using software. And the software itself is showing on the monitor(hardware) that is run by CPU, another hardware. </span>
<span>Hope you got it.. Please give me brnliest.
</span>