Tuesday 10 July 2012

C program to produce the folowing design using *'s



#include<stdio.h>
#include<conio.h>

void main()
{
int i,j,n;
char ch='A';
clrscr(); //to clear the screen
printf("How many lines?");
scanf("%d",&n);


for(i=0;i<n;++i)
{
for(j=0;j<=i;++j)
printf("%c",ch+j);
printf("\n");
}
getch();     //to stop the screen
}


Related Posts Plugin for WordPress, Blogger...