Get the following output:
2
4 2
6 4 2
8 6 4 2
10 8 6 4 2
#include <stdio.h>
int main()
{
int i,j;
for(i=1;i<=5;i=i+1)
{
for(j=i;j>=1;j=j-1)
{
printf("%d ",j*2);
}
printf("\n");
}
return 0;
}
Get the following output:
5
10 5
15 10 5
20 15 10 5
25 20 15 10 5
#include <stdio.h>
int main()
{
int i,j;
for(i=1;i<=5;i=i+1)
{
for(j=i;j>=1;j=j-1)
{
printf("%d ",j*5);
}
printf("\n");
}
return 0;
}
Get the following output:
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
#include <stdio.h>
int main()
{
int i,j;
for(i=1;i<=5;i=i+1)
{
for(j=i;j<=5;j=j+1)
{
printf("%d ",j);
}
printf("\n");
}
return 0;
}




