ABCDEFGFEDCBA
ABCDEF...FEDCBA
ABCDE......EDCBA
ABCD..........DCBA
ABC...............CBA
AB....................BA
A........................A
how to wirite the code using for loop in c?
pls help????
ABCDEFGFEDCBA
ABCDEF...FEDCBA
ABCDE......EDCBA
ABCD..........DCBA
ABC...............CBA
AB....................BA
A........................A
how to wirite the code using for loop in c?
pls help????
Last edited by arighnasarkar; 01-03-2011 at 01:50 AM.
What have you tried?
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
I hate to do this one for you, but I can't resist.Let me know what grade you get.Code:#include<stdio.h> int main( void ) { char *a[] = { "ABCDEFGFEDCBA", "ABCDEF...FEDCBA", "ABCDE......EDCBA", "ABCD..........DCBA", "ABC...............CBA", "AB....................BA", "A........................A", NULL }; size_t x; for( x = 0; a[ x ]; x++ ) puts( a[ x ] ); return 0; }
Quzah.
Hope is the first step on the road to disappointment.