Dosto kaise ho aap sab maje kr rhe ho na,mujhe pta tha aap sab bade inteligent hai, aap sabhi ko naye naye programs sikhne main bda maja aata hai isliye main aapke liye aaj phir se ek badiya sa program laya hui,is program to padiye aur btaiye kaise lga aapko:):):)
#include<conio.h>
int main()
{
int i,j,k,l;
clrscr();
for(i=1;i<=9;i++)
printf(" *");
printf("\n");
l=1;
for(i=4;i>=1;i--)
{
for(j=1;j<=i;j++)
printf(" *");
for(k=1;k<=l;k++)
printf(" ");
for(j=1;j<=i;j++)
printf(" *");
printf("\n");
l=l+2;
}
l=5;
for(i=2;i<=4;i++)
{
for(j=1;j<=i;j++)
printf(" *");
for(k=1;k<=l;k++)
printf(" ");
for(j=1;j<=i;j++)
printf(" *");
printf("\n");
l=l-2;
}
for(i=1;i<=9;i++)
printf(" *");
getch();
return(0);
}
THANKS FRIENDS........
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *#include<stdio.h>
#include<conio.h>
int main()
{
int i,j,k,l;
clrscr();
for(i=1;i<=9;i++)
printf(" *");
printf("\n");
l=1;
for(i=4;i>=1;i--)
{
for(j=1;j<=i;j++)
printf(" *");
for(k=1;k<=l;k++)
printf(" ");
for(j=1;j<=i;j++)
printf(" *");
printf("\n");
l=l+2;
}
l=5;
for(i=2;i<=4;i++)
{
for(j=1;j<=i;j++)
printf(" *");
for(k=1;k<=l;k++)
printf(" ");
for(j=1;j<=i;j++)
printf(" *");
printf("\n");
l=l-2;
}
for(i=1;i<=9;i++)
printf(" *");
getch();
return(0);
}
THANKS FRIENDS........
No comments:
Post a Comment
Please Give Me Your Views