English, asked by jveerunaik63, 7 months ago

Write a c program on flames in string​

Answers

Answered by sujalkumarroy620
1

Answer:

FLAMES is a popular game named after the acronym: Friends, Lovers, Affectionate, Marriage, Enemies, Sibling. This game does not accurately predict whether or not an individual is right for you, but it can be fun to play this with your friends.

There are two steps in this game:

Get the count:

Take the two names.

Remove the common characters with their respective common occurrences.

Get the count of the characters that are left .

Get the result :

Take FLAMES letters as [“F”, “L”, “A”, “M”, “E”, “S”]

Start removing letter using the count we got.

The letter which last the process is the result.

Example :

Input: Player1 = AJAY, Player2 = PRIYA

Output: Friends

Explanation:

In above given two names A and Y are common letters which are occurring one time(common count) in both names so we are removing these letters from both names. Now count the total letters that are left here it is 5. Now start removing letters one by one from FLAMES using the count we got and the letter which lasts the process is the result.

Counting is done in an anti-clockwise circular fashion.

Similar questions