Well this is a c++ forum.
Still your problem can be solved ,you are not using loops correctly
Code for given output will be as follows::
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,n;
int c=1;
clrscr();
printf("\nEnter the number of rows: ");
scanf("%d",&n);
I know, dude. You don't go to a c++ forum, especially when cplusplus is the website name and post something other than C++. I mean come on. We specialize in C++, we're glad to help you out but we'll have a hard time understanding it.