clear; clc;

% case (A)
for j = 1 : 5
    for i = 1 : j
        fprintf("*");
    end
    fprintf("\n");
end

% case (B)
% case (C)
for j = 1 : 5
    for i = 1 : 5 - j
        fprintf(" ");
    end
    for i = 1 : j
        fprintf("*");
    end
    fprintf("\n");
end

% case (D)