To work with FOR … DOWN TO function
Example:
program Welcome;
uses
Wincrt;
var
number:integer;
sqnumber:integer;
begin
for number:=9 downto 4 do
begin
sqnumber:=number*number;
Writeln(number,' ',sqnumber)
end
end.
Output:
To work with FOR … DOWN TO function
Example:
program Welcome;
uses
Wincrt;
var
number:integer;
sqnumber:integer;
begin
for number:=9 downto 4 do
begin
sqnumber:=number*number;
Writeln(number,' ',sqnumber)
end
end.
Output:
No comments:
Post a Comment