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 |
area of triangle=1/2*b*h base incresed by 4 times & height is devided by 2, the net effect of area
sir,i am going to give get for jindaal group please dend me some model question papers
A CLOCK SHOWED 5 MIN PAST 3'0 CLOCK ON SUNDAY EVENING WHEN THE CORRECT TIME WAS 3'0 CLOCK IT LOOSES UNIFORMLY AND WAS OBSERVED TO BE 10 MIN SLOW ON THE SUBSEQUENT TUESDAY AT 9PM . WHEN DID THE CLOCK SHOW THE CORRECT TIME(** PLEASE GIVE THE EXPLANATION ALSO***)
5 Answers FIITJEE, Infosys, TCS,
From 5 different green balls, four different blue balls and three different red balls, how many combinations of balls can be chosen taking at least one green and one blue ball?
Banking activities started in India in the year__________
18.8 * 8.8 * 28.8 can anyone tell simple method to calculate this without normal multiplication?
The average between a two digit number and the number obtained by interchanging the digits is 9. What is the difference between the two digits of the number? (a) 8 (b) 2 (c) 5 (d) Cannot be determined (e) None of these
The speed of a motor boat in still water is 15 km/hr and the rate of current is 3 km/hr. What is the distance travelled downstream in 12 minutes?
At 20% discount, a cycle is sold at a selling price of 2500 Rs. What is the actual price?
0 Answers BPCL Bharat Petroleum, Sonata,
Dear all plz send me last five years written question for rrb asst.locopilot. thanks my mail id is- gopal.4u@rediffmail.com
If 1square=4, 2square=10, 3square=21 then 4square=__?
18 Answers EA Electronic Arts, SSM,
A number when divided by D leaves a remainder of 8 and when divided by 3D leaves a remainder of 21 . What is the remainder left, when twice the number is divided by 3D?