Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

#Day65 #100DaysChallenge- Matlab Loops| Printing Alphabet

#Day65-Printing Alphabet


Write a code to print alphabets in given range

Start Character:g Stop Character:p

g h i j k l m n o p

Note: This code can be done using the in-built command. But for the challenge, I am trying to avoid those.

Matlab code 

function printingalphabet(n,m)
for i=n:1:m

Sample Input and Output
>> printingalphabet('a')
a b c d e f g h i j k l m n o p q r s t u v w x y z
>> printingalphabet('f')
f g h i j k l m n o p q r s t u v w x y z >> printingalphabet('s')
s t u v w x y z >> printingalphabet('s','y')
s t u v w x y >> printingalphabet('g','p')
g h i j k l m n o p

Click here for video description

Live Support:

No comments

Popular Posts