C program to produce the following design using s
#include<stdio.h>#include<conio.h>void main(){ int i,j,k,n; clrscr(); //to clear the screen printf("How many lines?"); scanf("%d",&n); n*=2; printf("
");
for(i=0;i<n;i+=2) { for(j=1;j<i;j+=2) printf(" "); for(k=n-1;k>i;--k) printf("*"); printf("
"); } getch(); //to stop the screen}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.