program;
var
max,val: integer;
label
start, ends;
begin
max:=-50;
val:=50;
start:
if val>max then val:=val-10
if val=max then goto ends;
goto start;
ends:
end.
Вот на C:
#include <stdio.h>int main(void){ int i; for(i = 50; i >= -50; i -= 10) { printf("%d\n", i); } printf("\n"); system("pause"); return 0;}
program;
var
max,val: integer;
label
start, ends;
begin
max:=-50;
val:=50;
start:
if val>max then val:=val-10
if val=max then goto ends;
goto start;
ends:
end.
Вот на C:
#include <stdio.h>
int main(void)
{
int i;
for(i = 50; i >= -50; i -= 10)
{
printf("%d\n", i);
}
printf("\n");
system("pause");
return 0;
}