Answer to Question #274663 in C for RRk

Question #274663

You are requested to write an application which ask the user to input 3 alphabets of their choice.

After that continuously ask the user for new alphabet, if all three alphabets of choice are entered

either in a forward sequence or backward, the application ends with telling them how many times

the user has entered each alphabet of the choice.


1
Expert's answer
2021-12-02T17:39:11-0500
#include<iostream>
using namespace std;
int main()
{
	char a,b,c,n;
	cout<<"Enter the three alphabets: ";
	cin>>a>>b>>c;
	int count=0;
	for(int i=0;i<10;i++){
	cout<<"Enter an alphabet: "<<i;
	cin>>n;
	
	if(n==a&&n==b&&n==c){
		n++;
		count+=1;
	}
	count++;


}
cout<<"Number of alphabets are: "<<count;
}

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS