5b-) WAP to print following outputs: ##### ....... #### ....... ### ...... ## ...... #

 

/* program to print :
#####
####
###
##
#
*/
#include<stdio.h>
#include<conio.h>

int main()
{
    int i; int j;
    for(i=5;i>0;i--)
    {
        for(j=5;j>5-i;j--)
        {
            printf("#");
        }
        printf("\n");
    }
    return 0;
}

Output:-
##### #### ### ## #
**** Thank you ****

Comments

Popular posts from this blog

18 Amazing programs in C.