.....the code i wrote along time ago (which you never responded too) easily does this backwards too:
Code:
#include <stdio.h>
int main (void)
{
int limit,x,col=1;
printf("\n\tEnter a Number Between 2 and 9: ");
scanf("%i", &limit);
printf("\n\t");
while (col<=limit)
{
for (x=limit; x>0; x--)
{
printf("$");
if ((col-1)==x)
{
printf("\b%d",limit);
}
}
col++;
printf("\n\t");
}
return 0;
}
I think you're trying too hard....anyways if you want to USE your code...one problem is you are missing an important "\n"....
Code:
else if (row > 1) {
printf("\n");
for(var = limit; var >= row; var--)
printf("$");
for(dar = 1;dar < row; dar++)
printf("%d", limit);
}
By throwing in that \n, the code will atleast chop the lines correctly...although JUST doing that, your code still messes up somewhat and doesn't print the right characters towards the bottom....your code looks confusing...take a look at mine, it uses much less confusion and variables.