P. Shape1 – Codeforces Problem Solution in C

Disclaimer: Make sure you tried enough before checking the solution

Problem: https://codeforces.com/group/MWSDmqGsZm/contest/219432/problem/P

#include <stdio.h>

int main()
{
    int i, j, rows;
    scanf("%d", &rows);

    for(i=1; i<=rows; i++)
    {
        for(j=i; j<=rows; j++)
        {
            printf("*");
        }

        printf("\n");
    }

    return 0;
}

Assiut University Training – Newcomers solution

Leave a Comment