Κεφάλαιo 11

Page 1 of 9

Question 1

Να χρησιμοποιήσετε την εντολή επανάληψης for , ώστε το
αποτέλεσμα να είναι η εκτύπωση των αριθμών 1 έως και 10.

arithmos:=1;
while arithmos < 11 do
begin
arithmos: =arithmos + 1;
write(arithmos);
end;
 

program erwtisi;
var
arithmos:integer;
begin
for arithmos:=0 to 10 do
   write (arithmos);
end.

 

program erwtisi;
var
arithmos:integer;
begin
for arithmos:=1 to 10 do
   write (arithmos);
end.