Перенос страниц

This commit is contained in:
Alexander Zhirov 2023-03-05 15:30:34 +03:00
parent 4d57446057
commit 4c954c9186
129 changed files with 14 additions and 15 deletions

View file

@ -0,0 +1,24 @@
import std.math, std.stdio;
struct Point
{
double x, y;
double norm()
{
return sqrt(x * x + y * y);
}
}
void main()
{
Point p;
int z;
with (p)
{
x = 3; // При­сваи­ва­ет зна­че­ние по­лю p.x
p.y = 4; // Хо­ро­шо, что все еще мож­но яв­но ис­поль­зо­вать p
writeln(norm()); // Вы­во­дит зна­че­ние по­ля p.norm, то есть 5
z = 1; // По­ле z ос­та­лось ви­ди­мым
}
}