Tuesday, March 1, 2011

Border (frame) program

This is a program of border creation through 'C' language you can say that a frame or windows to display information and good looking. I hope it's helpful to those students who are interested in creation of programs and
It help to build up your logic. If any body want another help regarding programming they can through reply box.





border.c


#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,b,c,d,e,f,g=0;
clrscr();
printf("Enter the rows number: ");
scanf("%d",&n);
a=n;
for(b=a;b>=1;b--)
{
printf("\n");
c=64;
for(d=a;d>=1;d--)
{
c++;
printf("%c",c);
}
for(e=1;e<g;e++)
printf(" ");
if(n-a==0)
for(f=a;f>1;f--)
{
c--;
printf("%c",c);
}
else
{
for(f=a;f>=1;f--)
{
printf("%c",c);
c--;
}
}
a--;
g=g+2;
}
getch();
}


BlogCatalog


Follow as1anfor1311 on Twitter

No comments:

Post a Comment