Нужно написать комментарием что означает каждая из этих строчек:
float x;
float easing = 0.01;
float diameter = 12;
void setup() {
size(220, 120);
smooth();
}
void draw() {
float targetX = mouseX;
x += (targetX - x) * easing;
ellipse(x, 40, 12, 12);
println(targetX + " : " + x);
}
И ещё
float x;
float y;
float px;
float py;
float easing = 0.05;
void setup() {
size(480, 120);
smooth();
stroke(0, 102);
}
void draw() {
float targetX = mouseX;
x += (targetX - x) * easing;
float targetY = mouseY;
y += (targetY - y) * easing;
float weight = dist(x, y, px, py);
strokeWeight(weight);
line(x, y, px, py);
py = y;
px = x;
}
PascalВыделить код
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 program prg; uses crt; var rez,chislo,min,max:integer; begin Write('Enter number = ');readln(chislo); //zanosim 1 chislo max:=chislo; //v max ta min min:=chislo; //chtobu potom mu soukb sravnivat s drugimi chislamu while (chislo<>0) do //zapuskaem zikl poka mu ne napishem 0 begin if (chislo>max)then max:=chislo; //sravnivaem s max if (chislo<min) then min:=chislo; //sravnivaem s min readln(chislo); //snova pihem chislo end; rez:=(max-min); //nahodim raznizy writeln('max(',max,') - min(',min,') = ',rez); //otvet end.