76 257
Assignments Done
Successfully Done
In May 2019

Answer to Question #26894 in C++ for jaymer

Question #26894
Write a program to ask the user to input the name of boy and name of girl. Count the number of common letters to their names and add them up. Determine the corresponding equivalent using the games FLAMES. (F = riends, L = Lovers, A = Angry, M = arriage , E = Enemies, S = Sweet)
Expert's answer
#include <iostream>
#include <string>
using namespace std;

int main(){
string _flames[] = {"Friends", "Lovers", "Angry", "Marriage", "Enemies", "Sweet"};
string _boy, _girl;
int _common = 0;
cout<<"Input the name of boy:";
cout<<"Input the name of girl:";
& for ( int i = 0; i < _girl.length(); i++ )
& {
& _common += count(_boy.begin(), _boy.end(), _girl[i]);
& }
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions