I have too create an output similar to this for input 5.
15
24
33
42
51
I have the code below but its just printing me this:
5
1
2
3
4
5
I don't understand why. Why is that?
15
24
33
42
51
I have the code below but its just printing me this:
5
1
2
3
4
5
I don't understand why. Why is that?
Code
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x, y, z;
printf("Introduce a number: \n");
scanf("%d", &z);
for (x=1;x<=z;x++)
{
printf("%d\n", x);
for (int y=z;y<=0;y--)
{
printf(" %d\n", y);
}
}

