C Programming |
Floyd Algorithm Character Pattern In C Posted: 05 Mar 2015 12:28 AM PST Q. WAP (Write A Program) to making the floyd algorithm character pattern in C as: A BC DEF GHIJ KLMNO Ans. /*c program for floyd algorithm character pattern*/ #include<stdio.h> int main() { int n=5,x='A'; char r,c; for(r='A'; n>=1; r++, n--) { for(c='A'; c<=r; c++, x++) printf("%c", x); printf("\n"); } getch(); return 0; } /************************************************************ The output of above program would be: *************************************************************/
Your might also like: |
You are subscribed to email updates from C Programming To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
Post a Comment