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

Current/most recent employer (Please state full names and address including Country and post code) Current Position Held When would you be available to start work? ONLINE INTERVIEW [INSTRUCTIONS: Give brief answers to all the under listed questions] QUESTIONS ANSWER SPACE 1) What are your years of experience? 2) How do you approach a technical problem? Give an example. How long do you think it would be before you will make a significant contribution to the team/company?

1454


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.

1396


A building with height D shadow upto G. What is the height of a neighbouring building with a shadow of C

1184


There is a room with 6' x 8'. A 1' tile is fixed along the 4 walls in one row. How many 1" tiles require to finish the work.

2054


If a man can swim downstream at 6kmph and upstream at 2kmph, his speed in still water is: It takes 30 days to fill a laboratory dish with bacteria. If the size of the bactiria doubles each day, how long did it take for the bactiria to fill one half of dish?

1504


What is the selling price of can cost selling price of .. cost .. is Rs 60 ,10% profit over selling price ?

1236


Each side of a rectangle is increased by 100% .By what percentage does the area increase?

1167


If a ball falls from 16 feet takes 4 seconds. How much time it will take when falls fron 64 feets.

1295


Seven members sat around a table for three days for a conference. The member's names were Abhishek, Amol, Ankur, Anurag, Bhuwan ,Vasu and Vikram. The meetings were chaired by Vikram. On the first evening members sat around the table alphabetically. On the following two nights, Vikram arranged the seating so that he could have Abhishek as near to him as possible and absent minded Vasu as far away as he could. On no evening did any person have sitting next to him a person who had previously been his neighbor. How did Vikram manage to seat everybody to the best advantage on the second and third evenings?

1490


The diameter of a wheel is 1.26m. If this wheel rotates 500 rotations, how long it can travel?

1543


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?

1407


How many five digit numbers are there such that two left most digits are even and remaining are odd?

1414


A man shows his friend a woman sitting in a park and says that she the daughter of my grandmother's only son. What is the relation between the two

1484


Two pencils costs 8 cents, then 5 pencils cost how much

1316


A chain is broken into three pieces of equal lenths containing 3 links each. It is taken to a backsmith to join into a single continuous one . How many links are to to be opened to make it ?

1514