How to print 8 to 2 in reverse order in multiple lines?

CODE




How to print 8 to 2 in reverse order in multiple lines?
int main()
{
    int i,j;
    for(i=1;i<=4;i++)
    {
        for(j=8;j>=2;j-=2)
            printf(" %d",j);
        printf("\n");
    }
}

Output:

 8 6 4 2
 8 6 4 2
 8 6 4 2
 8 6 4 2


How to print 8 to 2 in reverse order in multiple lines? How to print 8 to 2 in reverse order in multiple lines? Reviewed by Unknown on December 16, 2018 Rating: 5

No comments:

If you have any doubt or query ,comment below:

Programming copyright © 2018-19. Powered by Blogger.