Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Expression Detect First Character Userinput Matches Firstletter Include Include Usin Q35628848

Write an expression to detect that the first character ofuserInput matches firstLetter.

#include

#include

using namespace std;

int main() {

string userInput; char firstLetter;

getline(cin, userInput);

cin >> firstLetter;

if (/* Your solution goes here */) {

cout << “Found match: ” << firstLetter <<endl;

} else {

cout << “No match: ” << firstLetter <<endl;

}

return 0;

}

Leave a Reply

Your email address will not be published. Required fields are marked *