C4Codes
Pages
Home
quotedilse
book-kida
Thursday, 29 September 2016
pattern
pattern
5 1
4 2
3
4 2
5 1
#include<stdio.h>
#include<conio.h>
void main()
{
int n=5;
int i,j;
clrscr();
for(i=n;i>=1;i--)
{
for(j=n;j>=1;j--)
{
if(i==j||i+j==n+1)
printf(“%d”,j);
else
printf(“ “);
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment