A already assigned variable cannot be assigned twice You can make the variable change over to a new one or call a whole new one to assign one without a value or It might be possible to do v=n (v is variable and n is number / value)
Answer:
Las imágenes son las percepciones visuales que las personas tienen respecto de la realidad que los rodea. Así, a través de la visión, las personas pueden interpretar el contexto en el cual se encuentran inmersos, organizando los distintos componentes de la realidad en la cual desarrollan sus vidas, para poder comprender entonces de qué modo proceder ante las diferentes eventualidades de la vida.
Es decir que, a través de las imágenes, y en conjunto con las demás percepciones sensoriales, los seres humanos pueden contextualizarse en un entorno en el cual se desenvuelven, organizando su vida y su realidad a futuro.
Answer:
#include <bits/stdc++.h>
using namespace std;
bool isPalindrome(string str)
{
char a,b;
int length = str.length();
for (int i = 0; i < length / 2; i++)
{
a=tolower(str[i]);//Converting both first characters to lowercase..
b=tolower(str[length-1-i]);
if (b != a )
return false;
}
return true;
}
int main() {
string t1;
cin>>t1;
if(isPalindrome(t1))
cout<<"The string is Palindrome"<<endl;
else
cout<<"The string is not Palindrome"<<endl;
return 0;
}
Output:-
Enter the string
madam
The string is Palindrome
Enter the string
abba
The string is Palindrome
Enter the string
22
The string is Palindrome
Enter the string
67876
The string is Palindrome
Enter the string
444244
The string is not Palindrome
Explanation:
To ignore the cases of uppercase and lower case i have converted every character to lowercase then checking each character.You can convert to uppercase also that will also work.
Answer:
b. The names in the list should be in alphabetical order.
Explanation:
A binary search is an algorithm used for searching for an item in a list or array. The algorithm first sorts the data structure into order and then divides it into halves. If the searched item is less than the middle item in the list, then the algorithm searches for the target in the first half, else, in the second half. This reduces the time complexity of the search.