Skip to content
Snippets Groups Projects
right_angled_pyramid.c 312 B
/*Right angled pyramid
*****
****
***
**
* */
#include <stdio.h>
int main(){
    int n, m, i, j;
    printf("Enter the value of n: ");
    scanf("%d", &n);
    m=n;
    for(i=1; i<=n; i++){
        for(j=1; j<=m; j++){
            printf("*");
        }
        m--;
        printf("\n");
    }
    return 0;
}