6. Să se afişeze în fişierul “tri1.txt” triunghiul de numere:
n n-1 n-2…3 2 1
……………
3 2 1
2 1
1
program prob21;
var f:text;
i,j,n:integer;
begin
write(‘n=’); readln(n);
assign(f,’tri1.txt’);
rewrite(f);
for i:=n downto 1 do begin
for j:=i downto 1 do write(f,j:4);
writeln;
end;
close(f);
end.
unde n este un număr natural citit de la tastatură.
Warning: Trying to access array offset on value of type bool in /home/hartatur/public_html/jmarius.ro/wp-content/themes/flatsome/inc/shortcodes/share_follow.php on line 23
