write a program in C++ to output complete set of small english alphabets by using for loop statement.Deired output should be as follows:
abcdefghijklmnopqrstuvwxyz.
15 Replies - 1595 Views - Last Post: 20 May 2009 - 08:27 AM
#1
write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:03 PM
Replies To: write a program in C++ to output complete set of small english alphabe
#2
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:05 PM
Don't double post. We don't just give you code, you need to try it yourself and then we can help you with any errors or problems you have. Try using an array of letters and increment...
#3
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:06 PM
Stuff your string into an array & loop through it.
** hint, there are twenty six letters in the alphabet.
Let us know if you have any questions, or run into any bumps.
** hint, there are twenty six letters in the alphabet.
Let us know if you have any questions, or run into any bumps.
#4
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:42 PM
Or, really show off to your teacher and make a simple calculation as to what the letters equate to in ASCII and than have those numbers converted into letters and use a for loop to get all the letters. Not too difficult, just try it out.
#5
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:43 PM
That's a much better idea
#6
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:45 PM
Indeed, much can be taught through sucha simple program. My teacher had us build a program that ran through the printable ASCII characters. Something like 128 characters I think...Not too sure. And print the corresponding number on the left....It was neat, yet at the time was frustrating since I didn't know anything about anything.
#7
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:49 PM
I want to say 32 - 76, but that's probably wrong and off the top of my head.
#8
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:50 PM
Off the top of my head I think it's 48 through... ? That's the main reason I still have a DOS book at my office. They were always good for having ascii charts in the back.
#9
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:53 PM
#10
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 09:56 PM
Doh... I was thinking the numbers 1 though 9. Geez-low-eeze.
#11
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 10:39 PM
#12
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 11:01 PM
Much easier idea: make a char that is equal to 'a', then put it through a for loop that goes 26 times and each time output the char, then increment the char.
#13
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 11:03 PM
Yeah, if ya wanna make it all easy and such. LoL. That's what makes programming entertaining. All the different ways you can do things.
The ASCII chart is 128 characters long...0-127. I was saying I had to print out the entire printable ascii chart for one of my projects, not just the alphabet.
The ASCII chart is 128 characters long...0-127. I was saying I had to print out the entire printable ascii chart for one of my projects, not just the alphabet.
This post has been edited by IngeniousHax: 19 May 2009 - 11:04 PM
#14
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 11:10 PM
Then you'd set the char to '\x0' and then increment it 128 times.
#15
Re: write a program in C++ to output complete set of small english alphabe
Posted 19 May 2009 - 11:27 PM
|
|

New Topic/Question
Reply




MultiQuote





|