This blog consists of C and C++ programs. C and C++ programming is the basics to learn any programming language. Most of the programs are provided with their respective outputs. This blog also contains Data Structures programs using Object-Oriented Programming (C++). Some of the best books for learning C and C++ programming are also mentioned.

Thursday 25 July 2013

Program to print the String pattern 2

#include<stdio.h>
int main()
{
char *c="ABCDEF";
char *c1="FEDCBA";
int i,j=0;
clrscr();
for(i=6;i>0;i--)
{
printf("%*.*s",i,i,c);
printf("%*.*s\n",i,i,c1+j);
j++;
}
getch();
}


No comments:

Post a Comment