Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Time constant for an integrator and differentiator should be

1154


A farmer built a fence around his 17 cows, in a square shaped region. He used 27 fence poles on each side of the square. How many poles did he need altogether?

1807


A printer produced 176,400 pages in a given day. If the printer was in operation for seven hours during the day, how many pages did it print per minute?

1085


sadrine's avg on four tests is 80 which of the following cannot be the number of tests on which she earned exactly 80 points

2154


If the area of a square increases by 69%, then the side of the square increased by

1120


on an item a company gave 25% discount then they get 25% profit if it gives 10% discount then what is the profit.

1086


If A=Z, B=Y, C=X, .......... Z=A, Then GROUP = ?

1138


how to learn aptitude quickly

2527


In 1978, a kg of paper was sold at Rs25/. If the paper rate increases at 1.5% more than the inflation rate which is 6.5% a year, then what will be the cost of a kg of paper after 2 years?

1113


A moves 3 kms east from his starting point . He then travels 5 kms north. From that point he moves 8 kms to the east.How far is A from his starting point?

1335


What is the selling price of a car? If the cost of the car is Rs.60 and a profit of 10% over selling price is earned.

1266


what types of question tricom will ask

2133


HOW + MUCH = POWER Then P + O + W + E + R =

2396


Each row of letters or numbers has a rule connecting them. Write the next number or letterin the brackets. 1 , 4 , 9 , 16 , 25 , 36 , (_ _ _)

1219


A fuel dealer mixes two brands of fuel which cost in the ratio 2:3 A solution of 30% Brand A with Brand B yields profit of 10% when sold at RS 297. What is cost of brand B?

1921