Answer:
// This program is written in C++ programming language
// Comments are used for explanatory purpose
// Program start here
#include<iostream>
#include<stdlib. h>
using namespace std;
int main ()
{
// Create two char variables; myinput and userguess
char myinput, userguess;
// Accept input for myinput
cout<<"Pick a letter: ";
cin>>myinput;
// Initialize userguess to empty string
userguess = ' ';
system("CLS");
// Clear screen so that user won't see myinput. The content of the variable won't be cleared
// Prompt user to guess the letter correctly;
cout<<"Take a guess: ";
cin>>userguess;
// The iteration below will be repeated until the user guess correcto
while( userguess != myinput)
{
cout<<"You guessed wrongly\\"<<Take another guess: ";
cin>>userguess;
}
cout<<"You guessed right!!!";
return 0;
}
// End of Program