A table containing decimal nos. from 1 to 100 and their
roman Equivalent was given. We were required to write a
function : char* ConverToRoman(int number) : to
convert the given number( 1<=number<=100) into its numerical
equivalent.
I want a solution in C/C++ language
Answer / monu rohila
public static string GetPalindromeString(string theInputString)
{
int j = 0;
int k = 0;
string aPalindrome = string.Empty;
string aLongestPalindrome = string.Empty ;
for (int i = 1; i < theInputString.Length; i++)
{
k = i + 1;
j = i - 1;
while (j >= 0 && k < theInputString.Length)
{
if (theInputString[j] != theInputString[k])
{
break;
}
else
{
j--;
k++;
}
aPalindrome = theInputString.Substring(j + 1, k - j - 1);
if (aPalindrome.Length > aLongestPalindrome.Length)
{
aLongestPalindrome = aPalindrome;
}
}
}
return aLongestPalindrome;
}
`
| Is This Answer Correct ? | 1 Yes | 14 No |
Sanal has 60 red marbles, 156 blue marbles and 204 green marbles. He distributes them amongst a group of kids, such that each kid gets equal marbles and no kid has marbles of more than one colour. Find the number of kids.
A monkey starts climbing up a tree 20ft. tall. Each hour, it hops 3ft. and slips back 2ft. How much time would it take the monkey to reach the top?
Sir iam going to write exam for the post of Officers under training in APSRTC. Please send me the model papers to my mail ganjiramji@gmail.com
1!+2!+....50!=?
A lorry averages 55mph for the first 4 hours of a trip and averages 70 mph for each additional hour. The average speed for entire trip was 60 mph. How many hours long is the trip? a)14 b)12 c)11 d)8 e)6
A certain type of mixture is prepared by mixing brand A at Rs.9 a kg. with brand B at Rs.4 a kg. If the mixture is worth Rs.7 a kg., how many kgs. brand A are needed to make 40kgs. of the mixture?
in early medevial india what did the term jital refer to
15 Men take 21 days of 8 hrs. each to do a piece of work. How many days of 6 hrs. each would do if 21 women take. If 3 women do as much work of 2 men.
If A=Z, B=Y, C=X, .......... Z=A, Then POCKET = ?
Oshkosh did a study of the colors used in African national flags. He found that 38 flags have red, 20 have blue, 13 have both red and blue, and 8 have neither red nor blue. How many flags a. have red but not blue? b. have blue but not red? c. were inclulded in the study?
A 4" cube is painted in all its faces and then it is cut down into 1" blocks. How many 1" blocks are there even without a single face being painted?
What is Derivative and different types of Derivatives? Difference between Call and Put Option?