Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

This question is for MATLAB users: Write a script echoletters that will prompt the user for letters of the alphabet and echo-print them until the

This question is for MATLAB users:

Write a script echoletters that will prompt the user for letters of the alphabet and echo-print them until the user enters a character that is not a letter of the alphabet. At that point, the script will print the nonletter, and a count of how many letters were entered. Here are examples of running this script:

>> echoletters

Enter a letter: T

Thanks, you entered a T

Enter a letter: a

Thanks, you entered a a

Enter a letter: 8

8 is not a letter

You entered 2 letters

>> echoletters

Enter a letter: !

! is not a letter

You entered 0 letters

The format must be exactly as shown above.

Hint: Use isletter function to check if the input is a letter. isletter returns 1 for a character and 0 for non-character.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions