Answer:
#include <iostream>
#include <array>
using namespace std;
bool isPalindrome(string str)
{
int length = str.length();
for (int i = 0; i < length / 2; i++)
if (toupper(str[i]) != toupper(str[length - 1 - i]))
return false;
return true;
}
int main()
{
array<string, 6> tests = { "madam", "abba", "22", "67876", "444244", "trymEuemYRT" };
for (auto test : tests) {
cout << test << " is " << (isPalindrome(test) ? "" : "NOT ") << "a palindrome.\n";
}
}
Explanation:
The toupper() addition forces characters to uppercase, thereby making the comparison case insensitive.
You just answer other people’s questions you can also use this app to help you with your questions as well
Color's RGB value indicates its red, green, and blue intensity. Each intensity value is on a scale of 0 to 255, or in hexadecimal from 00 to FF.
RGB values are used in HTML, XHTML, CSS, and other web standards. For more, including visual samples and RGB values, see:
Answer:
The RAM capacity expressed in bytes is
512 million bytes
Explanation:
a) Data and Calculations:
RAM contains 256m words
Each word = 16 bits
1 bit = 0.125 byte
This means that each word will have 2 (16 * 0.125) bytes
Therefore, the RAM contains 256m * 2 = 512 million bytes
b) A bit is 0.125 bytes and a byte is eight times bigger than a bit. This implies that there are eight megabits in every megabyte, and one gigabyte is eight times bigger than one gigabit. The 512 million bytes above are about 488.3 gigabytes, since 1 gigabyte equals 1,024 megabytes or 1,046,576 kilobytes.
Solution :
It is given that :
The digits 0 through 9 in hexadecimal have their usual meanings. But letters A through F function like the digits and it means digits 10 through 15, respectively.
Now the base of a hexadecimal is 16.
Now we know from 0 to 9
A, B, C, D, E, F
Now the maximum two digits hexadecimal numbers are = F F
So, F F 
= 255