Q:

Printing upside down Triangle in c

The following code is supposed to print a rectangle created from right triangles of numbers and astrics but my code only prints out the numbers but its not printing out the astrics like the example bellow. 
int x,y,z;

for (x=1; x<=10; x++)
  for (y=1; y<=x; y++)
     printf("%d", y);
  for (z=0; z<i, ++z)
     printf("*");

This is the example of what the above code is supped to print. 
1*******
12******
123*****
1234****
12345***
123456**
1234567*

A:

I edited your code a little:
int x,y,z;

for (x=1; x<=10; x++){
  for (y=1; y<=x; y++) printf("%d", y);
  for (z=y; z<=10; ++z) printf("*");
  printf("\n");
}

y and z loops should be in one code block to achieve the result; you'd also need newline after each line of numbers and asterisks.