|
-
Mar 9th, 2001, 10:12 AM
#1
Thread Starter
Addicted Member
This is post at www.cprogramming.com and noone seemed to get it. I was just curious if any of you could write down code that could do this.
{
It seems as if no one out their can help me, but I think it may be my fault for not explaining this program clearly. So I will take one more shot at this. Here goes!
what I need is this: (I already have the right side, I just need help on getting the left side). Thanks.
The exact post is http://www.cprogramming.com/cgi-bin/...age=0&Session=
a
ab
abc
abcd
abcde
abcdef
abcdefg
abcdefgh
ihgfedcbabcdefghi
jihgfedcbabcdefghij
kjihgfedcbabcdefghijk
etc,etc...}
-
Mar 9th, 2001, 11:20 AM
#2
Frenzied Member
First of all my experience with that board has been bad. I think there is like 5 people that have any IQ on that board. Anyway......
Your link is broke, so I have no idea what your question is. Can you fix the link, or retry your question.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Mar 9th, 2001, 11:32 AM
#3
Thread Starter
Addicted Member
hmm, link works fine for me.
I would have to agree, my experience there has also been bad.
-
Mar 9th, 2001, 11:51 AM
#4
Frenzied Member
Yeah the link worked this time, but I still dont understand what your question is.
Are you trying to get a print out lined up like that?
Are you trying to get letters like that?
I dont understand what you are after
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Mar 14th, 2001, 04:41 PM
#5
Addicted Member
This what you mean?
Code:
#include <iostream.h>
void main()
{
int l; // letter
int n; // letter to count to
for(n = 1; n <= 26; n++)
{
// set l to the current letter
for(l = n; l >= 1; l--)
{
cout << (char)(96 + l);
}
// now start from a to n
for(l = 1; l <= n; l++)
{
if((96 + l) != 97)// don't repeat a
cout << (char)(96 + l);
}
cout << endl;
l = 1;
}
cout << endl;
}
// output
/*
dcbabcd
edcbabcde
fedcbabcdef
gfedcbabcdefg
hgfedcbabcdefgh
ihgfedcbabcdefghi
jihgfedcbabcdefghij
kjihgfedcbabcdefghijk
lkjihgfedcbabcdefghijkl
mlkjihgfedcbabcdefghijklm
nmlkjihgfedcbabcdefghijklmn
onmlkjihgfedcbabcdefghijklmno
ponmlkjihgfedcbabcdefghijklmnop
qponmlkjihgfedcbabcdefghijklmnopq
rqponmlkjihgfedcbabcdefghijklmnopqr
srqponmlkjihgfedcbabcdefghijklmnopqrs
tsrqponmlkjihgfedcbabcdefghijklmnopqrst
utsrqponmlkjihgfedcbabcdefghijklmnopqrstu
vutsrqponmlkjihgfedcbabcdefghijklmnopqrstuv
wvutsrqponmlkjihgfedcbabcdefghijklmnopqrstuvw
xwvutsrqponmlkjihgfedcbabcdefghijklmnopqrstuvwx
yxwvutsrqponmlkjihgfedcbabcdefghijklmnopqrstuvwxy
zyxwvutsrqponmlkjihgfedcbabcdefghijklmnopqrstuvwxyz
Press any key to continue
*/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|