#include<stdio.h>
void design(int n)
{
int i,j;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",2*j-1);
}
printf("\n");
}
}
main()
{
design(4);
}
void design(int n)
{
int i,j;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",2*j-1);
}
printf("\n");
}
}
main()
{
design(4);
}
Write a ‘c’ function to generate the following figure for n=7 .. .FOR n 7
ReplyDelete#include
void design(int n)
{
int i,j;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",2*j-1);
}
printf("\n");
}
}
main()
{
design(7);
}