Can anyone help me to create a C program to display random alphabet without repeat? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can anyone help me to create a C program to display random alphabet without repeat?

Which mean the alphabet just only display one time, such as , if 'A' already printed in first, then 'A' will not appear again.

16th Dec 2021, 5:04 PM
Shannen
3 Answers
+ 5
I think the best way is to first shuffle the alphabet and then print first to last. That works quickly and there are no repetitions.
16th Dec 2021, 5:39 PM
Agnes Ahlberg
Agnes Ahlberg - avatar
+ 4
Well, you could declare the entire alphabet and use a shuffle function. https://code.sololearn.com/cNZPgAtdL6io/?ref=app After that you just need to loop over n characters. n is the number of characters that you want print.
16th Dec 2021, 5:41 PM
Anya
Anya - avatar
+ 2
Thanks guys
16th Dec 2021, 11:59 PM
Shannen