Answer: I will list them down below!
Explanation:
He can buy 6, 50 cent candies.
He can buy 30, 20 cent candies.
He can buy 6, 30 cent candies and 6, 20 cent candies.
He can buy 15, 20 cent candies and 3, 50 cent candies.
He can by 3, 20 and 30 cent candies and 3, 50 cent candies.
That's it.
Hope this helps!
Answer:
#include <iostream>
#include <string>
using namespace std;
bool isPalindrome(string str)
{
int length = str.length();
for (int i = 0; i < length / 2; i++)
{
if (tolower(str[i]) != tolower(str[length - 1 - i]))
return false;
}
return true;
}
int main()
{
string s[6] = {"madam", "abba", "22", "67876", "444244", "trymeuemyrt"};
int i;
for(i=0; i<6; i++)
{
//Testing function
if(isPalindrome(s[i]))
{
cout << "\n " << s[i] << " is a palindrome... \n";
}
else
{
cout << "\n " << s[i] << " is not a palindrome... \n";
}
}
return 0;
}
Explanation:
a motorcycle Motor is made out of iron
Answer:
diesel fuel is pumped at high pressure to the injectors which are responsible for entering the fuel into the combustion chamber,
when the piston is at the top the pressure is so high that it explodes the fuel (diesel) that results in a generation of mechanical power