Okay so after twisting some stuff around, i ended up achieving what I had aimed...just with a slight different problem. The output puts much more lines than the user inputs. Perhaps, Someone can help with what wrong went with the logic.
Code:
#include<stdio.h>#include<conio.h>
void main()
{
int p,o,i,j,v=1,n,m,rows=0,l;
clrscr();
printf("Enter number of rows.\n");
scanf("%d",&n);
m=n;
o=n;
for(i=1;i<n;i++)
{
if(n==1)
{
for(i=0;i<=m*2-1;i++)
{
printf("*");
}
printf("\n");
rows+=1;
}
for(l=n;l>=1;l--)
{
for(j=n;j>=rows;j--)
{
printf("*");
}
for(v=1;v<=rows;v++)
{
printf("%d",rows);
}
for(p=n;p>=rows;p--)
{
printf("*");
}
printf("\n");
rows+=1;
}
}
getch();
}